Skip to content

Commit

Permalink
Correct ARM FTZ setting
Browse files Browse the repository at this point in the history
Thanks Luna for catching that it looked wrong!
  • Loading branch information
baconpaul committed Dec 9, 2021
1 parent 62d8c64 commit d4f9c48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/common/CPUFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ FPUStateGuard::FPUStateGuard()
#endif

#if defined(__aarch64__)
uint64_t FPSR = 0;
asm volatile("MRS %0, FPSR " : "=r"(FPSR));
uint64_t FPCR = 0;
asm volatile("MRS %0, FPCR " : "=r"(FPCR));

uint64_t FPCR = FPSR | (1ULL << 24);
asm volatile("MSR FPCR, %0 " : : "r"(FPCR));
uint64_t FPCR_new = FPCR | (1ULL << 24);
asm volatile("MSR FPCR, %0 " : : "r"(FPCR_new));

priorS = FPSR;
priorS = FPCR;
#endif
}

Expand Down

0 comments on commit d4f9c48

Please sign in to comment.