File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1810,6 +1810,8 @@ extern "C" int jl_test_cpu_feature(jl_cpu_feature_t feature)
1810
1810
#ifdef _CPU_AARCH64_
1811
1811
// FPCR FZ, bit [24]
1812
1812
static constexpr uint32_t fpcr_fz_mask = 1 << 24 ;
1813
+ // FPCR FZ16, bit [19]
1814
+ static constexpr uint32_t fpcr_fz16_mask = 1 << 19 ;
1813
1815
// FPCR DN, bit [25]
1814
1816
static constexpr uint32_t fpcr_dn_mask = 1 << 25 ;
1815
1817
@@ -1833,7 +1835,8 @@ extern "C" JL_DLLEXPORT int32_t jl_get_zero_subnormals(void)
1833
1835
extern " C" JL_DLLEXPORT int32_t jl_set_zero_subnormals (int8_t isZero)
1834
1836
{
1835
1837
uint32_t fpcr = get_fpcr_aarch64 ();
1836
- fpcr = isZero ? (fpcr | fpcr_fz_mask) : (fpcr & ~fpcr_fz_mask);
1838
+ static uint32_t mask = fpcr_fz_mask | (jl_test_cpu_feature (JL_AArch64_fullfp16) ? fpcr_fz16_mask : 0 );
1839
+ fpcr = isZero ? (fpcr | mask) : (fpcr & ~mask);
1837
1840
set_fpcr_aarch64 (fpcr);
1838
1841
return 0 ;
1839
1842
}
You can’t perform that action at this time.
0 commit comments