Commit Graph

1403 Commits

Author SHA1 Message Date
GCC Administrator
b1da991623 Daily bump. 2021-04-06 00:16:43 +00:00
Michael Meissner
f1d012911b Honor --disable-decimal-float on PowerPC Decimal/Float128 conversions
This patch fixes the problem that the Decimal <-> Float128 conversions
were built even if the user configured GCC with --disable-decimal-float.

libgcc/
2021-04-05  Florian Weimer  <fweimer@redhat.com>

	* config/rs6000/t-float128 (fp128_ppc_funcs): Add decimal floating
	point functions for $(decimal_float) only.

Co-Authored-By: Michael Meissner  <meissner@linux.ibm.com>
2021-04-05 13:33:16 -04:00
GCC Administrator
c0756c4eb3 Daily bump. 2021-04-04 00:16:26 +00:00
Jakub Jelinek
cda41ce0e8 rs6000: Fix up libgcc ABI when built with --with-long-double-format=ieee [PR97653]
__floatunditf and __fixtfdi and a couple of other libgcc{.a,_s.so}
entrypoints for backwards compatibility should mean IBM double double
handling (i.e. IFmode), gcc emits such calls for that format and
form IEEE long double emits *kf* instead.
When gcc is configured without --with-long-double-format=ieee ,
everything is fine, but when it is not, we need to compile those
libgcc sources with -mno-gnu-attribute -mabi=ibmlongdouble.
The following snippet in libgcc/config/rs6000/t-linux was attempting
to ensure that, and for some routines it works fine (e.g. for _powitf2).
But, due to 4 different types of bugs it doesn't work for most of those
functions, which means that in --with-long-double-format=ieee
configured gcc those *tf* entrypoints instead handle the long double
arguments as if they were KFmode.

The bugs are:
1) the first few objs properly use $(objext) as suffix, but
   several other contain a typo and use $(object) instead,
   which is a variable that isn't set to anything, so we don't
   add .o etc. extensions
2) while unsigned fix are properly called _fixuns*, unsigned float
   are called _floatun* (without s), but the var was using there
   the extra s and so didn't match
3) the variable didn't cover any of the TF <-> TI conversions,
   only TF <-> DI conversions
4) nothing in libgcc_s.so was handled, as those object files are
   called *_s.o rather than *.o and IBM128_SHARED_OBJS used wrong
   syntax of the GNU make substitution reference, which should be
   $(var:a=b) standing for $(patsubst a,b,$(var)) but it used
   $(var🅰️b) instead

2021-04-03  Jakub Jelinek  <jakub@redhat.com>

	PR target/97653
	* config/rs6000/t-linux (IBM128_STATIC_OBJS): Fix spelling, use
	$(objext) instead of $(object).  Use _floatunditf instead of
	_floatunsditf.  Add tf <-> ti conversion objects.
	(IBM128_SHARED_OBJS): Use proper substitution reference syntax.
2021-04-03 10:05:32 +02:00
GCC Administrator
65374af219 Daily bump. 2021-03-30 00:16:29 +00:00
Michael Meissner
645bfc1619 Require GLIBC 2.32 for Decimal/_Float128 conversions.
In the patch that I applied on March 2nd, I had code to provide support for
Decimal/_Float128 conversions if the user did not use at least GLIBC 2.32.  It
did this by using __ibm128 as an intermediate type.  The trouble is __ibm128
cannot represent all of the numbers that _Float128 can, and you lose if you do
this conversion.

This patch removes this support.  The dfp-bit.c functions now call the the
__sprintfieee128 and __strtoieee128 functions to do the conversion.  If the
user does not have GLIBC, they will get a linker error that these functions do
not exist.

The float128 support functions are only built into the static libgcc, so there
isn't an issue with having references to __strtoieee128 and __sprintfieee128
with older GLIBC libraries.

As an added bonus, this patch eliminates the __sprintfkf function which
included stdio.h to get a definition for the sprintf library function.  This
allows for building cross compilers without having to have a target stdio.h
available.

libgcc/
2021-03-29  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/t-float128 (fp128_decstr_funcs): Delete.
	(fp128_ppc_funcs): Do not add $(fp128_decstr_funcs).
	(fp128_decstr_objs): Delete.
	* dfp-bit.h: Call __sprintfieee128 to do conversions from
	_Float128 to a Decimal type.  Call __strtoieee128 to do
	conversions from a Decimal type to _Float128.
	* config/rs6000/_sprintfkf.c: Delete file.
	* config/rs6000/_sprintfkf.h: Delete file.
	* config/rs6000/_strtokf.c: Delete file.
	* config/rs6000/_strtokf.h: Delete file.
2021-03-29 16:43:14 -04:00
GCC Administrator
bf1f3168f4 Daily bump. 2021-03-24 00:16:25 +00:00
Marcus Comstedt
f1af1326d2 RISC-V: Update soft-fp config for big-endian
libgcc/
	* config/riscv/sfp-machine.h (__BYTE_ORDER): Set according
	to __BYTE_ORDER__.
2021-03-23 17:31:13 +08:00
GCC Administrator
0ad6a2e2f0 Daily bump. 2021-03-07 00:16:24 +00:00
Jakub Jelinek
73a9216b8a libgcov: Fix build on Darwin [PR99406]
As reported, bootstrap currently fails on older Darwin because MAP_ANONYMOUS
is not defined.

The following is what gcc/system.h does, so I think it should work for
libgcov.

2021-03-06  Jakub Jelinek  <jakub@redhat.com>

	PR gcov-profile/99406
	* libgcov.h (MAP_FAILED, MAP_ANONYMOUS): If HAVE_SYS_MMAN_H is
	defined, define these macros if not defined already.
2021-03-06 16:22:27 +01:00
GCC Administrator
67f10d28f0 Daily bump. 2021-03-05 00:16:21 +00:00
Martin Liska
6a8fc0c31a profiling: fix streaming of TOPN counters
libgcc/ChangeLog:

	PR gcov-profile/99105
	* libgcov-driver.c (write_top_counters): Rename to ...
	(write_topn_counters): ... this.
	(write_one_data): Pre-allocate buffer for number of items
	in the corresponding linked lists.
	* libgcov.h (malloc_mmap): New function.
	(allocate_gcov_kvp): Use it.

gcc/testsuite/ChangeLog:

	PR gcov-profile/99105
	* gcc.dg/tree-prof/indir-call-prof-malloc.c: Use profile
	correction as the wrapped malloc is called one more time
	from libgcov.
	* gcc.dg/tree-prof/pr97461.c: Likewise.
2021-03-04 16:21:52 +01:00
Martin Liska
4c955b4ad3 gcov: call mmap MAP_ANONYMOUS with fd equal to -1
libgcc/ChangeLog:

	PR gcov-profile/99385
	* libgcov.h (allocate_gcov_kvp): Call mmap with fd equal to -1.
2021-03-04 11:53:33 +01:00
GCC Administrator
f3641ac70e Daily bump. 2021-03-04 00:16:48 +00:00
Martin Liska
00d79dc4be gcov: use mmap pools for KVP.
gcc/ChangeLog:

	PR gcov-profile/97461
	* gcov-io.h (GCOV_PREALLOCATED_KVP): Remove.

libgcc/ChangeLog:

	PR gcov-profile/97461
	* config.in: Regenerate.
	* configure: Likewise.
	* configure.ac: Check sys/mman.h header file
	* libgcov-driver.c (struct gcov_kvp): Remove static
	pre-allocated pool and use a dynamic one.
	* libgcov.h (MMAP_CHUNK_SIZE): New.
	(gcov_counter_add): Use mmap to allocate pool for struct
	gcov_kvp.
2021-03-03 14:21:45 +01:00
GCC Administrator
d97a92dca9 Daily bump. 2021-03-03 00:16:48 +00:00
Michael Meissner
76c99cb113 Fix __sprintfkf prototype in libgcc.
The prototype of __sprintfkf in _sprintfkf.h did not match the function in
_sprintfkf.c.  This patch fixes the prototype.  I also included the
_sprintfkf.h file in _sprintfkf.c to make sure the prototype is correct and to
eliminate a warning about declaring the function without a previous
declaration.

libgcc/
2021-03-01  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/_sprintfkf.h (__sprintfkf): Fix prototype to match
	the function.
	* config/rs6000/_sprintfkf.c: Include _sprintfkf.h.
2021-03-01 22:13:33 -05:00
GCC Administrator
4028d01a05 Daily bump. 2021-02-25 00:16:29 +00:00
Jakub Jelinek
35da095d7e libgcc: Avoid signed negation overflow in __powi?f2 [PR99236]
When these functions are called with integer minimum, there is UB on the libgcc
side.  Fixed in the obvious way, the code in the end wants ABSU_EXPR behavior.

2021-02-24  Jakub Jelinek  <jakub@redhat.com>

	PR libgcc/99236
	* libgcc2.c (__powisf2, __powidf2, __powitf2, __powixf2): Perform
	negation of m in unsigned type.
2021-02-24 20:07:38 +01:00
Christophe Lyon
be30dd8992 arm: Fix CMSE support detection in libgcc (PR target/99157)
As discussed in the PR, the Makefile fragment lacks a double '$' to
get the return-code from GCC invocation, resulting is CMSE support
missing from multilibs.

I checked that the simple patch proposed in the PR fixes the problem.

2021-02-23  Christophe Lyon  <christophe.lyon@linaro.org>
	    Hau Hsu  <hsuhau617@gmail.com>

	PR target/99157
	libgcc/
	* config/arm/t-arm: Fix cmse support detection.
2021-02-24 16:00:21 +00:00
GCC Administrator
2f5765cf25 Daily bump. 2021-02-23 00:16:34 +00:00
Michael Meissner
692ba083d9 Fix a comment line that was too long.
libgcc/
2021-02-22  Michael Meissner  <meissner@linux.ibm.com>

	* dfp-bit.c (BFP_TO_DFP): Fix a comment line that was too long.
2021-02-22 15:54:39 -05:00
Michael Meissner
781183595a Add conversions between _Float128 and Decimal.
This patch implements conversions between _Float128 and the 3 Decimal floating
types.  It does this by extendending the dfp-bit conversions to add a new
binary floating point type (KF), and doing the conversions in the same manner
as the other binary/decimal conversions.

For conversions from _Float128 to Decimal, this patch uses a function
(__sprintfkf) instead of the sprintf function to convert long double values to
strings.  The __sprintfkf function determines if GLIBC 2.32 or newer is used
and calls the IEEE 128-bit version of sprintf (__sprintfieee128).  If the GLIBC
is earlier than 2.32, the code will convert _Float128 to __ibm128 and then use
the normal sprintf to convert this value.

For conversions from Decimal to _Float128, this patch uses a function
(__strtokf) instead of strtold to convert the strings from the Decimal
conversion to long double.  The __strtokf function determines if GLIBC 2.32 or
newer is used, and if it is, calls the IEEE 128-bit version (__strtoieee128).
If the GLIBC is earlier than 2.32, the code will call strtold and convert the
__ibm128 value to _Float128.

These functions will primarily be used if/when the default PowerPC long double
type is changed to IEEE 128-bit, but they could also be used if the user
explicitly converts _Float128 to/from a Decimal type.

libgcc/
2021-02-22  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/_dd_to_kf.c: New file.
	* config/rs6000/_kf_to_dd.c: New file.
	* config/rs6000/_kf_to_sd.c: New file.
	* config/rs6000/_kf_to_td.c: New file.
	* config/rs6000/_sd_to_kf.c: New file.
	* config/rs6000/_sprintfkf.c: New file.
	* config/rs6000/_sprintfkf.h: New file.
	* config/rs6000/_strtokf.h: New file.
	* config/rs6000/_strtokf.c: New file.
	* config/rs6000/_td_to_kf.c: New file.
	* config/rs6000/quad-float128.h: Add new declarations.
	* config/rs6000/t-float128 (fp128_dec_funcs): New macro.
	(fp128_decstr_funcs): New macro.
	(ibm128_dec_funcs): New macro.
	(fp128_ppc_funcs): Add the new conversions.
	(fp128_dec_objs): Force Decimal <-> __float128 conversions to be
	compiled with -mabi=ieeelongdouble.
	(fp128_decstr_objs): Force __float128 <-> string conversions to be
	compiled with -mabi=ibmlongdouble.
	(ibm128_dec_objs): Force Decimal <-> __float128 conversions to be
	compiled with -mabi=ieeelongdouble.
	(FP128_CFLAGS_DECIMAL): New macro.
	(IBM128_CFLAGS_DECIMAL): New macro.
	* dfp-bit.c (DFP_TO_BFP): Add PowerPC _Float128 support.
	(BFP_TO_DFP): Add PowerPC _Float128 support.
	* dfp-bit.h (BFP_KIND): Add new binary floating point kind for
	IEEE 128-bit floating point.
	(DFP_TO_BFP): Add PowerPC _Float128 support.
	(BFP_TO_DFP): Add PowerPC _Float128 support.
	(BFP_SPRINTF): New macro.
2021-02-22 15:33:29 -05:00
GCC Administrator
aa69f0a820 Daily bump. 2021-01-28 00:16:56 +00:00
Jakub Jelinek
686b1cdfdc libgcc, i386: Add .note.GNU-stack sections to the ms sse/avx sav/res
On Linux, GCC emits .note.GNU-stack sections when compiling code to mark
the code as not needing or needing executable stack, missing section means
unknown.  But assembly files need to be marked manually.  We already
mark various *.S files in libgcc manually, but the
avx_resms64f.o
avx_resms64fx.o
avx_resms64.o
avx_resms64x.o
avx_savms64f.o
avx_savms64.o
sse_resms64f.o
sse_resms64fx.o
sse_resms64.o
sse_resms64x.o
sse_savms64f.o
sse_savms64.o
files aren't marked, so when something links it in, it will require
executable stack.  Nothing in the assembly requires executable stack though.

2021-01-27  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/savms64.h: Add .note.GNU-stack section on Linux.
	* config/i386/savms64f.h: Likewise.
	* config/i386/resms64.h: Likewise.
	* config/i386/resms64f.h: Likewise.
	* config/i386/resms64x.h: Likewise.
	* config/i386/resms64fx.h: Likewise.
2021-01-27 11:50:13 +01:00
GCC Administrator
e62bb7f083 Daily bump. 2021-01-27 00:16:33 +00:00
Martin Liska
d40b21eebc libgcov: improve profile reproducibility
libgcc/ChangeLog:

	PR gcov-profile/98739
	* libgcov.h (gcov_topn_add_value): Do not train when
	we have a merged profile with a negative number of total
	value.
2021-01-26 12:44:34 +01:00
GCC Administrator
161e4c0862 Daily bump. 2021-01-26 00:16:34 +00:00
Martin Liska
5089df534b Restore profile reproducibility.
gcc/ChangeLog:

	PR gcov-profile/98739
	* common.opt: Add missing sign symbol.
	* value-prof.c (get_nth_most_common_value): Restore handling
	of PROFILE_REPRODUCIBILITY_PARALLEL_RUNS and
	PROFILE_REPRODUCIBILITY_MULTITHREADED.

libgcc/ChangeLog:

	PR gcov-profile/98739
	* libgcov-merge.c (__gcov_merge_topn): Mark when merging
	ends with a dropped counter.
	* libgcov.h (gcov_topn_add_value): Add return value.
2021-01-25 13:30:34 +01:00
GCC Administrator
be0851b8e9 Daily bump. 2021-01-14 00:16:24 +00:00
Stafford Horne
b77f6d2fa8 or1k: Support for softfloat to emulate hw exceptions
This allows the openrisc softfloat implementation to set exceptions.
This also sets the correct tininess after rounding value to be
consistent with hardware and simulator implementations.

libgcc/ChangeLog:

	* config/or1k/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO,
	FP_RND_PINF, FP_RND_MINF, FP_RND_MASK, FP_EX_OVERFLOW,
	FP_EX_UNDERFLOW, FP_EX_INEXACT, FP_EX_INVALID, FP_EX_DIVZERO,
	FP_EX_ALL): New constant macros.
	(_FP_DECL_EX, FP_ROUNDMODE, FP_INIT_ROUNDMODE,
	FP_HANDLE_EXCEPTIONS): New macros.
	(_FP_TININESS_AFTER_ROUNDING): Change to 1.
2021-01-14 08:45:01 +09:00
Samuel Thibault
2b356e689c hurd: libgcc unwinding over signal trampolines with SIGINFO
When the application sets SA_SIGINFO, the signal trampoline parameters
are different to follow POSIX.

	libgcc/
	* config/i386/gnu-unwind.h (x86_gnu_fallback_frame_state): Add the
	posix siginfo case to struct handler_args. Detect between legacy
	and siginfo from the second parameter, which is a small sigcode in
	the legacy case, and a pointer in the siginfo case.
2021-01-13 11:54:54 +01:00
Jakub Jelinek
99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Jakub Jelinek
c48514bea6 Update Copyright in ChangeLog files
Do this separately from all other Copyright updates, as ChangeLog files
can be modified only separately.
2021-01-04 09:35:45 +01:00
GCC Administrator
108beb75da Daily bump. 2020-12-21 00:16:20 +00:00
Max Filippov
18e86fae2a gcc: xtensa: implement bswapsi2, bswapdi2 and helpers
2020-12-20  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config/xtensa/xtensa.md (bswapsi2, bswapdi2): New patterns.

gcc/testsuite/
	* gcc.target/xtensa/bswap.c: New test.

libgcc/
	* config/xtensa/lib1funcs.S (__bswapsi2, __bswapdi2): New
	functions.
	* config/xtensa/t-xtensa (LIB1ASMFUNCS): Add _bswapsi2 and
	_bswapdi2.
2020-12-20 14:02:26 -08:00
GCC Administrator
f6e8e2797e Daily bump. 2020-12-09 00:16:50 +00:00
Ian Lance Taylor
f41dd93ade libgcc: block signals when releasing split-stack memory
* generic-morestack-thread.c (free_segments): Block signals during
	thread exit.
2020-12-08 10:17:48 -08:00
GCC Administrator
b8dd0ef74d Daily bump. 2020-12-04 00:16:36 +00:00
Michael Meissner
9f1a650199 PowerPC: PR libgcc/97543 and libgcc/97643, fix long double issues
If you use a compiler with long double defaulting to 64-bit instead of 128-bit
with IBM extended double, you get linker warnings about mis-matches in the gnu
attributes for long double (PR libgcc/97543).  Even if the compiler is
configured to have long double be 64 bit as the default with the configuration
option '--without-long-double-128' you get the warnings.

You also get the same issues if you use a compiler with long double defaulting
to IEEE 128-bit instead of IBM extended double (PR libgcc/97643).

The issue is the way libgcc.a/libgcc.so is built.  Right now when building
libgcc under Linux, the long double size is set to 128-bits when building
libgcc.  However, the gnu attributes are set, leading to the warnings.

One feature of the current GNU attribute implementation is if you have a shared
library (such as libgcc_s.so), the GNU attributes for the shared library is an
inclusive OR of all of the objects within the library.  This means if any
object file that uses the -mlong-double-128 option and uses long double, the GNU
attributes for the library will indicate that it uses 128-bit IBM long
doubles.  If you have a static library, you will get the warning only if you
actually reference an object file  with the attribute set.

This patch does two things:

    1)	All of the object files that support IBM 128-bit long doubles
	explicitly set the ABI to IBM extended double.

    2)	I turned off GNU attributes for building the shared library or for
        building the IBM 128-bit long double support.

libgcc/
2020-12-03  Michael Meissner  <meissner@linux.ibm.com>

	PR libgcc/97543
	PR libgcc/97643
	* config/rs6000/t-linux (IBM128_STATIC_OBJS): New make variable.
	(IBM128_SHARED_OBJS): New make variable.
	(IBM128_OBJS): New make variable.  Set all objects to use the
	explicit IBM format, and disable gnu attributes.
	(IBM128_CFLAGS): New make variable.
	(gcc_s_compile): Add -mno-gnu-attribute to all shared library
	modules.
2020-12-03 14:50:26 -05:00
Alexandre Oliva
c05ece92c6 introduce overridable clear_cache emitter
This patch introduces maybe_emit_call_builtin___clear_cache for the
builtin expander machinery and the trampoline initializers to use to
clear the instruction cache, removing a source of inconsistencies and
subtle errors in low-level machinery.

I've adjusted all trampoline_init implementations that used to issue
explicit calls to __clear_cache or similar to use this new primitive.


Specifically on vxworks targets, we needed to drop the __clear_cache
symbol in libgcc, for reasons related with linking that I didn't need
to understand, and we wanted to call cacheTextUpdate directly, despite
the different calling conventions: the second argument is a length
rather than the end address.

So I introduced a target hook to enable target OS-level overriding of
builtin __clear_cache call emission, retaining nearly (*) the same
logic to govern the decision on whether to emit a call (or nothing, or
a machine-dependent insn) but enabling a call to a target
system-defined function with different calling conventions to be
issued, without having to modify .md files of the various
architectures supported by the target system to introduce or modify
clear_cache insns.

(*) I write "nearly" mainly because, when not optimizing, we'd issue a
call regardless, but since the call may now be overridden, I added it
to the set of builtins that are not directly turned into calls when
not optimizing, following the normal expansion path instead.  It
wouldn't be hard to skip the emission of cache-clearing insns when not
optimizing, but it didn't seem very important, especially for the new
uses from trampoline init.

    Another difference that might be relevant is that now we expand
the begin and end arguments unconditionally.  This might make a
difference if they have side effects.  That's prettty much impossible
at expand time, but I thought I'd mention it.


I have NOT modified targets that did not issue cache-clearing calls in
trampoline init to use the new clear_cache-calling infrastructure even
if it would expand to nothing.  I have considered doing so, to have
__builtin___clear_cache and trampoline init call cacheTextUpdate on
all vxworks targets, but decided not to, since on targets that don't
do any cache clearing, cacheTextUpdate ought to be a no-op, even
though rs6000 seems to use icbi and dcbf instructions in the function
called to initialize a trampoline, but AFAICT not in the __clear_cache
builtin.  Hopefully target maintainers will have a look and take
advantage of this new piece of infrastructure to remove such
(apparent?) inconsistencies.  Not rs6000 and other that call asm-coded
trampoline setup instructions, for sure, but they might wish to
introduce a CLEAR_INSN_CACHE macro or a clear_cache expander if they
don't have one.


for  gcc/ChangeLog

	* builtins.c (default_emit_call_builtin___clear_cache): New.
	(maybe_emit_call_builtin___clear_cache): New.
	(expand_builtin___clear_cache): Split into the above.
	(expand_builtin): Do not issue clear_cache call any more.
	* builtins.h (maybe_emit_call_builtin___clear_cache): Declare.
	* config/aarch64/aarch64.c (aarch64_trampoline_init): Use
	maybe_emit_call_builtin___clear_cache.
	* config/arc/arc.c (arc_trampoline_init): Likewise.
	* config/arm/arm.c (arm_trampoline_init): Likewise.
	* config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
	* config/csky/csky.c (csky_trampoline_init): Likewise.
	* config/m68k/linux.h (FInALIZE_TRAMPOLINE): Likewise.
	* config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
	* config/tilepro/tilepro.c (tilepro_trampoline_init): Ditto.
	* config/vxworks.c: Include rtl.h, memmodel.h, and optabs.h.
	(vxworks_emit_call_builtin___clear_cache): New.
	* config/vxworks.h (CLEAR_INSN_CACHE): Drop.
	(TARGET_EMIT_CALL_BUILTIN___CLEAR_CACHE): Define.
	* target.def (trampoline_init): In the documentation, refer to
	maybe_emit_call_builtin___clear_cache.
	(emit_call_builtin___clear_cache): New.
	* doc/tm.texi.in: Add new hook point.
	(CLEAR_CACHE_INSN): Remove duplicate 'both'.
	* doc/tm.texi: Rebuilt.
	* targhooks.h (default_meit_call_builtin___clear_cache):
	Declare.
	* tree.h (BUILTIN_ASM_NAME_PTR): New.

for  libgcc/ChangeLog

	* config/t-vxworks (LIB2ADD): Drop.
	* config/t-vxworks7 (LIB2ADD): Likewise.
	* config/vxcache.c: Remove.
2020-12-02 22:10:32 -03:00
GCC Administrator
94358e4770 Daily bump. 2020-12-01 00:16:38 +00:00
Stefan Kanthak
a8ae23920f fixed _bswapsi2 function
libgcc

	* libgcc2.c (bswapsi2): Make constants unsigned.
2020-11-29 18:05:46 -07:00
GCC Administrator
360258daf5 Daily bump. 2020-11-26 00:16:41 +00:00
Stefan Kanthak
4919ed711c Improve abs with overflow implementations
libgcc/

	* libgcc2.c (absvSI2): Simplify/improve implementation by using
	builtin_add_overflow.
	(absvsi2, absvDI2): Likewise.
2020-11-25 11:38:46 -07:00
GCC Administrator
82e5048e70 Daily bump. 2020-11-21 00:16:29 +00:00
Maciej W. Rozycki
f50c417a03 NetBSD/libgcc: Check for TARGET_DL_ITERATE_PHDR in the unwinder
Disable USE_PT_GNU_EH_FRAME frame unwinder support for old OS versions,
fixing compilation errors:

.../libgcc/unwind-dw2-fde-dip.c:75:21: error: unknown type name 'Elf_Phdr'
   75 | # define ElfW(type) Elf_##type
      |                     ^~~~
.../libgcc/unwind-dw2-fde-dip.c:132:9: note: in expansion of macro 'ElfW'
  132 |   const ElfW(Phdr) *p_eh_frame_hdr;
      |         ^~~~
.../libgcc/unwind-dw2-fde-dip.c:75:21: error: unknown type name 'Elf_Phdr'
   75 | # define ElfW(type) Elf_##type
      |                     ^~~~
.../libgcc/unwind-dw2-fde-dip.c:133:9: note: in expansion of macro 'ElfW'
  133 |   const ElfW(Phdr) *p_dynamic;
      |         ^~~~
.../libgcc/unwind-dw2-fde-dip.c:165:37: warning: 'struct dl_phdr_info' declared inside parameter list will not be visible outside of this definition or declaration
  165 | _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
      |                                     ^~~~~~~~~~~~
[...]

and producing a working cross-compiler at least with VAX/NetBSD 1.6.2.

	libgcc/
	* unwind-dw2-fde-dip.c [__OpenBSD__ || __NetBSD__]
	(USE_PT_GNU_EH_FRAME): Do not define if !TARGET_DL_ITERATE_PHDR.
2020-11-20 21:11:22 +00:00
GCC Administrator
25bb75f841 Daily bump. 2020-11-19 00:16:30 +00:00
Jozef Lawrynowicz
bf7b94d407 MSP430: Add 64-bit hardware multiply support
Hardware multipliers that support widening 32-bit multiplication can
be used to perform a 64-bit * 64-bit multiplication more efficiently
than a software implementation.

The following equation is used to perform 64-bit multiplication for
devices with "32bit" or "f5series" hardware multiply versions:

  64bit_result = (low32_op0 * lop32_op1)
    + ((low32_op0 * high32_op1) << 32)
       + ((high32_op0 * low32_op1) << 32)

libgcc/ChangeLog:

	* config/msp430/lib2hw_mul.S (mult64_hw): New.
	(if MUL_32): Use mult64_hw for __muldi3.
	(if MUL_F5): Use mult64_hw for __muldi3.
	* config/msp430/lib2mul.c (__muldi3): New.
	* config/msp430/t-msp430 (LIB2FUNCS_EXCLUDE): Define.
2020-11-18 11:05:27 +00:00
GCC Administrator
29c5d9ceb9 Daily bump. 2020-11-17 00:16:27 +00:00