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
This commit is contained in:
Dimitry Andric 2017-08-29 21:45:00 +00:00
parent a3cf03a519
commit e1ca2b88e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323001

View file

@ -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