martin
38e436ce90
While we are using softfloat for 128 bit long double values, make fpsetround
...
update the softfloat rounding mode as well.
2013-02-15 09:25:03 +00:00
martin
33794f1e61
Make all conversions from 128bit (long double) floats to integral types
...
use rounding towards zero (casts to int/long are not affected by current
rounding mode).
Fixes PR port-sparc64/47535.
2013-02-15 09:24:05 +00:00
matt
f3e2916319
Add hardfloat version of fabs using the vabs.f64 instruction
2013-02-03 07:14:41 +00:00
matt
c2bb80258f
Add support for earmhf and earmhfeb and add SRCS.hardfloat.
2013-02-03 01:55:19 +00:00
matt
5e9ff8d257
include <arm/vfpreg.h>
2013-02-03 01:50:54 +00:00
matt
8c98e4a90f
Reorganize to appease lint.
2013-01-31 06:47:55 +00:00
matt
23ce88cd93
AAPCS (EABI) requires that VFP D8-D15 are always saved, regardless whether
...
the soft float or hard float ABI is being used. However, if there isn't a
FPU that can't be done. So only save/restore them if a FPU is present. When
libc initializes, it does a sysctl to determine if there is a FPU and stores
the result which _setjmp/setjmp uses. If there was a FPU, the magic in the
jmp_buf is changed to reflect that the VFP registers were saved. longjmp uses
the magic to determine if it needs to restore the VFP registers.
2013-01-29 19:23:09 +00:00
matt
eafb63402e
for earm*, add arm_initfini.c
2013-01-29 19:15:52 +00:00
matt
c910167987
Add a constructor for EABI to determine if a FPU is present on the system.
2013-01-29 19:14:54 +00:00
matt
ce0c445114
When building for earm*, compile __aeabi_[df]cmpun.c and __aeabi_[il]div0.c
2013-01-26 07:09:41 +00:00
matt
44fb56c3b5
Appease clang by making 64-bit literals use ULL
2013-01-26 07:08:14 +00:00
matt
89bd1391e1
Add __aeabi_[fd]cmpun for IEEE unordered compares (requires by ARM RTABI).
2013-01-26 07:04:22 +00:00
matt
b9421e37cf
Use __ARM_PCS_VFP to determine whether the VFP is being used.
2013-01-25 08:52:16 +00:00
matt
2b36c3f081
Add simple version of strncat for ARM.
2013-01-23 05:44:52 +00:00
matt
60e851836f
Remove all FPA code.
...
Support VFP for hard float
Allow MKSOFTFLOAT=no
2013-01-11 13:55:25 +00:00
martin
96ee7c5e41
Add fpclassify{,d}
2012-12-27 10:41:18 +00:00
matt
b160e122c8
Add missing registers.
2012-11-28 02:18:24 +00:00
christos
7655db5ec2
fix lint.
2012-11-24 15:20:58 +00:00
christos
bbd1e49222
Use __arraycount(), and cast to u_int.
2012-11-24 07:16:04 +00:00
matt
19392803b5
Add $NetBSD$ tag. Use ip to save r1 instead of the stack.
2012-11-20 22:02:46 +00:00
christos
febe1abc11
add new files to fix static linking
2012-10-30 12:42:37 +00:00
christos
09560d8fbc
add split files
2012-10-10 02:15:03 +00:00
skrll
74f6af556a
Remove magic numbers.
2012-09-27 11:20:20 +00:00
skrll
67a0557406
Fixup the stack pointer in the ucontext returned by getcontext.
...
This fixes the following tests
lib/libc/sys/t_swapcontext.c
lib/libpthread/t_swapcontext.c
2012-09-27 09:53:53 +00:00
martin
25aaf6211d
Fix register usage
2012-09-13 11:47:46 +00:00
manu
eed5245297
Fix the build, _UC_UNIQUE has been renamed _UC_TLSBASE
2012-09-12 14:13:43 +00:00
manu
bba80928a8
setcontext() used to be incompatible with -lpthread since it affected
...
the TLS pointer, therefore wrecking the pthread environement.
Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.
We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.
While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)
Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64
Approved by core@
2012-09-12 02:00:51 +00:00
drochner
0e9330ed96
Align the stack to a 16-byte boundary on LWP creation.
...
This is more than required by the ABI, but it makes programs using SSE
in a thread work without extra compiler flags or performance hit.
2012-08-31 20:57:24 +00:00
matt
83802169c5
Use the generic fixuns ieee754 instead of the ones from softfloat.
2012-08-06 07:55:21 +00:00
matt
6efc7d7a82
Don't need -I${.CURDIR}/arch/arm anymore
2012-08-06 01:54:21 +00:00
matt
d60b6e14bc
Moving this to <arm/aeabi.h> in sys
2012-08-06 01:53:08 +00:00
matt
ab019a8e67
Mostly for reference, this header defines the "C" portion of the ARM
...
run time API for AAPCS (EABI).
2012-08-06 01:49:27 +00:00
matt
97e52b17df
Only compile __aeabi_*ldivmod for earm/earmeb.
2012-08-05 06:34:44 +00:00
skrll
b061958676
Ensure stack alignment. "looks fine" matt@
2012-08-05 05:10:38 +00:00
matt
20eab5e912
For ARM EABI, we need -DDSOFTFLOAT_NEED_FIXUNS too.
2012-08-05 04:54:38 +00:00
matt
e9b001e787
Add __aeabi_uldivmod (unsigned long long div/mod).
...
Only use 32-bit softfloat if arm/armeb.
earm/earmeb will use the 64-bit softfloat.
2012-08-05 04:30:46 +00:00
matt
c843862e5a
Error out if compiled with -mfp=vfp and -mhard-float
2012-08-01 06:10:21 +00:00
matt
8dbdbc2b73
Add #error cases in case someone tries to compile hardfloat VFP libraries.
2012-08-01 06:02:13 +00:00
skrll
ddb65e7ed5
Backout previous. ld.so requires the division routines so this needs
...
more thought.
2012-07-30 12:57:54 +00:00
reinoud
228e4d05b8
On the libc/libgcc clashes cleanup that removed divsi3.o from libc, ARM/evbarm
...
was forgotten. This patch fixes it making static binaries possible again!
2012-07-11 18:24:27 +00:00
matt
90845bcc64
Slight optimization.
2012-07-08 00:59:34 +00:00
abs
9e66e6d75e
Update old-style definitions to ANSI, remove a couple of register
...
definitions along the way. Fixed gcc 4.1 build (thank you vax)
2012-06-25 22:32:43 +00:00
christos
3d365e7447
fix old style definitions; XXX: gcc should have picked them up but it did not.
2012-06-24 15:26:02 +00:00
christos
df08f9313b
nbytes is now size_t
2012-03-29 21:21:04 +00:00
christos
781d83f527
make constant explicitly unsigned
2012-03-29 19:27:05 +00:00
christos
ad6ae348d8
fix lint, should nbytes be changed to size_t to match with the struct passed?
2012-03-29 19:26:21 +00:00
skrll
5b9a421677
Shut lint up.
...
From he@
2012-03-23 09:34:09 +00:00
christos
1bb11e66cb
vax-specific lint fixes.
2012-03-22 17:32:21 +00:00
skrll
d66dab05c4
Shut lint up about dp.
...
From he@
2012-03-22 12:31:32 +00:00
he
1c46a18eb1
Follow the pattern from powerpc, make lint happy.
2012-03-22 09:32:04 +00:00