diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-08-29 21:45:00 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-08-29 21:45:00 +0000 |
commit | e1ca2b88e23583f14994d0478b2c9f86cc184110 (patch) | |
tree | 4985e8b87b3a8e6b647f2cdead32801338c0eb49 /lib/libcompiler_rt | |
parent | a3cf03a519242c993c431e843a6e038cc4e1e81c (diff) | |
download | src-e1ca2b88e23583f14994d0478b2c9f86cc184110.tar.gz src-e1ca2b88e23583f14994d0478b2c9f86cc184110.zip |
In compiler-rt, a few assembler implementations for i386 floating point
conversion functions use SSE2 instructions, but these are not guarded by
#ifdef __SSE2__, and there is no implementation using general purpose
registers. For these functions, use the generic C variants instead,
otherwise they will cause SIGILL on older processors.
Reported by: bsdpr@phoe.frmug.org
PR: 221733
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=323001
Diffstat (limited to 'lib/libcompiler_rt')
-rw-r--r-- | lib/libcompiler_rt/Makefile.inc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 7a4da165913f..98ba45b35e68 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -57,18 +57,12 @@ SRCF+= fixunsxfsi SRCF+= fixunsxfti SRCF+= fixxfdi SRCF+= fixxfti -SRCF+= floatdidf -SRCF+= floatdisf SRCF+= floatditf -SRCF+= floatdixf SRCF+= floatsitf SRCF+= floattidf SRCF+= floattisf SRCF+= floattixf -SRCF+= floatundidf -SRCF+= floatundisf SRCF+= floatunditf -SRCF+= floatundixf SRCF+= floatunsidf SRCF+= floatunsisf SRCF+= floatuntidf @@ -128,6 +122,23 @@ SRCF+= umoddi3 SRCF+= umodsi3 SRCF+= umodti3 +# Avoid using SSE2 instructions on i386. +.if ${MACHINE_CPUARCH} == "i386" +SRCS+= floatdidf.c +SRCS+= floatdisf.c +SRCS+= floatdixf.c +SRCS+= floatundidf.c +SRCS+= floatundisf.c +SRCS+= floatundixf.c +.else +SRCF+= floatdidf +SRCF+= floatdisf +SRCF+= floatdixf +SRCF+= floatundidf +SRCF+= floatundisf +SRCF+= floatundixf +.endif + # __cpu_model support, only used on x86 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCF+= cpu_model |