[arm64] Set march to armv8.2-a+fp16, fix posix math
The march can be reduces later if needed. Use arm64 optimized math, and set std=c11 so __FLT_EVAL_METHOD__ is 0 and not 16: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=100854
This commit is contained in:
@@ -40,6 +40,7 @@ rule ArchitectureSetup architecture
|
|||||||
switch $(cpu) {
|
switch $(cpu) {
|
||||||
case ppc : archFlags += -mcpu=440fp ;
|
case ppc : archFlags += -mcpu=440fp ;
|
||||||
case arm : archFlags += -march=armv7-a -mfloat-abi=hard ;
|
case arm : archFlags += -march=armv7-a -mfloat-abi=hard ;
|
||||||
|
case arm64 : archFlags += -march=armv8.2-a+fp16 ;
|
||||||
case x86 : archFlags += -march=pentium ;
|
case x86 : archFlags += -march=pentium ;
|
||||||
case riscv64 : archFlags += -march=rv64gc ;
|
case riscv64 : archFlags += -march=rv64gc ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
SubDir HAIKU_TOP src system libroot posix musl math arm64 ;
|
SubDir HAIKU_TOP src system libroot posix musl math arm64 ;
|
||||||
|
|
||||||
SubDirCcFlags -Wno-unused-but-set-variable ;
|
# std=c11 so __FLT_EVAL_METHOD__ is 0 and not 16:
|
||||||
|
# https://gcc.gnu.org/bugzilla//show_bug.cgi?id=100854
|
||||||
|
SubDirCcFlags -Wno-unused-but-set-variable -std=c11 ;
|
||||||
|
|
||||||
SubDirSysHdrs [ FDirName $(SUBDIR) .. .. include ] ;
|
SubDirSysHdrs [ FDirName $(SUBDIR) .. .. include ] ;
|
||||||
UseHeaders [ FDirName $(SUBDIR) .. .. internal ] ;
|
UseHeaders [ FDirName $(SUBDIR) .. .. internal ] ;
|
||||||
@@ -15,7 +17,7 @@ local generics =
|
|||||||
atan.c atanf.c atanl.c
|
atan.c atanf.c atanl.c
|
||||||
atanh.c atanhf.c atanhl.c
|
atanh.c atanhf.c atanhl.c
|
||||||
cbrt.c cbrtf.c cbrtl.c
|
cbrt.c cbrtf.c cbrtl.c
|
||||||
ceil.c ceilf.c ceill.c
|
ceill.c
|
||||||
copysign.c copysignf.c copysignl.c
|
copysign.c copysignf.c copysignl.c
|
||||||
cos.c cosf.c cosl.c __cosl.c __cos.c __cosdf.c
|
cos.c cosf.c cosl.c __cosl.c __cos.c __cosdf.c
|
||||||
cosh.c coshf.c coshl.c
|
cosh.c coshf.c coshl.c
|
||||||
@@ -28,10 +30,10 @@ local generics =
|
|||||||
fabsl.c
|
fabsl.c
|
||||||
fdim.c fdimf.c fdiml.c
|
fdim.c fdimf.c fdiml.c
|
||||||
finite.c finitef.c
|
finite.c finitef.c
|
||||||
floor.c floorf.c floorl.c
|
floorl.c
|
||||||
fmal.c
|
fmal.c
|
||||||
fmax.c fmaxf.c fmaxl.c
|
fmaxl.c
|
||||||
fmin.c fminf.c fminl.c
|
fminl.c
|
||||||
fmod.c fmodf.c fmodl.c
|
fmod.c fmodf.c fmodl.c
|
||||||
frexp.c frexpf.c frexpl.c
|
frexp.c frexpf.c frexpl.c
|
||||||
hypot.c hypotf.c hypotl.c
|
hypot.c hypotf.c hypotl.c
|
||||||
@@ -40,29 +42,29 @@ local generics =
|
|||||||
j0.c j0f.c j1.c j1f.c jn.c jnf.c
|
j0.c j0f.c j1.c j1f.c jn.c jnf.c
|
||||||
ldexp.c ldexpf.c ldexpl.c
|
ldexp.c ldexpf.c ldexpl.c
|
||||||
lgamma.c lgammaf.c lgammaf_r.c lgammal.c lgamma_r.c
|
lgamma.c lgammaf.c lgammaf_r.c lgammal.c lgamma_r.c
|
||||||
llrint.c llrintf.c llrintl.c
|
llrintl.c
|
||||||
llround.c llroundf.c llroundl.c
|
llroundl.c
|
||||||
log10.c log10f.c log10l.c
|
log10.c log10f.c log10l.c
|
||||||
log1p.c log1pf.c log1pl.c
|
log1p.c log1pf.c log1pl.c
|
||||||
log2.c log2_data.c log2f.c log2f_data.c log2l.c
|
log2.c log2_data.c log2f.c log2f_data.c log2l.c
|
||||||
logb.c logbf.c logbl.c
|
logb.c logbf.c logbl.c
|
||||||
log.c log_data.c logf.c logf_data.c logl.c
|
log.c log_data.c logf.c logf_data.c logl.c
|
||||||
lrint.c lrintf.c lrintl.c
|
lrintl.c
|
||||||
lround.c lroundf.c lroundl.c
|
lroundl.c
|
||||||
__math_divzero.c __math_divzerof.c __math_invalid.c __math_invalidf.c
|
__math_divzero.c __math_divzerof.c __math_invalid.c __math_invalidf.c
|
||||||
__math_oflow.c __math_oflowf.c __math_uflow.c __math_uflowf.c
|
__math_oflow.c __math_oflowf.c __math_uflow.c __math_uflowf.c
|
||||||
__math_xflow.c __math_xflowf.c
|
__math_xflow.c __math_xflowf.c
|
||||||
modf.c modff.c modfl.c
|
modf.c modff.c modfl.c
|
||||||
nan.c nanf.c nanl.c
|
nan.c nanf.c nanl.c
|
||||||
nearbyint.c nearbyintf.c nearbyintl.c
|
nearbyintl.c
|
||||||
nextafter.c nextafterf.c nextafterl.c
|
nextafter.c nextafterf.c nextafterl.c
|
||||||
nexttoward.c nexttowardf.c nexttowardl.c
|
nexttoward.c nexttowardf.c nexttowardl.c
|
||||||
__polevll.c pow.c pow_data.c powf.c powf_data.c powl.c
|
__polevll.c pow.c pow_data.c powf.c powf_data.c powl.c
|
||||||
remainder.c remainderf.c remainderl.c
|
remainder.c remainderf.c remainderl.c
|
||||||
__rem_pio2.c __rem_pio2f.c __rem_pio2_large.c __rem_pio2l.c
|
__rem_pio2.c __rem_pio2f.c __rem_pio2_large.c __rem_pio2l.c
|
||||||
remquo.c remquof.c remquol.c
|
remquo.c remquof.c remquol.c
|
||||||
rint.c rintf.c rintl.c
|
rintl.c
|
||||||
round.c roundf.c roundl.c
|
roundl.c
|
||||||
scalb.c scalbf.c scalbln.c scalblnf.c scalblnl.c scalbn.c scalbnf.c scalbnl.c
|
scalb.c scalbf.c scalbln.c scalblnf.c scalblnl.c scalbn.c scalbnf.c scalbnl.c
|
||||||
signgam.c
|
signgam.c
|
||||||
significand.c significandf.c
|
significand.c significandf.c
|
||||||
@@ -74,7 +76,7 @@ local generics =
|
|||||||
__tan.c tan.c __tandf.c tanf.c __tanl.c tanl.c
|
__tan.c tan.c __tandf.c tanf.c __tanl.c tanl.c
|
||||||
tanh.c tanhf.c tanhl.c
|
tanh.c tanhf.c tanhl.c
|
||||||
tgamma.c tgammaf.c tgammal.c
|
tgamma.c tgammaf.c tgammal.c
|
||||||
trunc.c truncf.c truncl.c
|
truncl.c
|
||||||
;
|
;
|
||||||
|
|
||||||
local architectureObject ;
|
local architectureObject ;
|
||||||
@@ -85,9 +87,21 @@ for architectureObject in [ MultiArchSubDirSetup arm64 ] {
|
|||||||
UseHeaders [ FDirName $(SUBDIR) .. .. arch $(architecture) ] ;
|
UseHeaders [ FDirName $(SUBDIR) .. .. arch $(architecture) ] ;
|
||||||
|
|
||||||
MergeObject <$(architecture)>posix_musl_math.o :
|
MergeObject <$(architecture)>posix_musl_math.o :
|
||||||
|
ceil.c ceilf.c
|
||||||
fabs.c fabsf.c
|
fabs.c fabsf.c
|
||||||
|
floor.c floorf.c
|
||||||
fma.c fmaf.c
|
fma.c fmaf.c
|
||||||
|
fmax.c fmaxf.c
|
||||||
|
fmin.c fminf.c
|
||||||
|
llrint.c llrintf.c
|
||||||
|
llround.c llroundf.c
|
||||||
|
lrint.c lrintf.c
|
||||||
|
lround.c lroundf.c
|
||||||
|
nearbyint.c nearbyintf.c
|
||||||
|
rint.c rintf.c
|
||||||
|
round.c roundf.c
|
||||||
sqrt.c sqrtf.c
|
sqrt.c sqrtf.c
|
||||||
|
trunc.c truncf.c
|
||||||
|
|
||||||
$(generics)
|
$(generics)
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user