mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
ape/lib9: sync arm getfcr.s implementation
The arm assembler supports movw to handle getfcr and setfcr now, no need to hack it with macros; sync from plan9 libc.
This commit is contained in:
parent
566c3ca2de
commit
2d8adc7b88
1 changed files with 11 additions and 6 deletions
|
@ -1,16 +1,21 @@
|
|||
/* for VFP */
|
||||
#define VMRS(fp, cpu) WORD $(0xeef00a10 | (fp)<<16 | (cpu)<<12) /* FP → arm */
|
||||
#define VMSR(cpu, fp) WORD $(0xeee00a10 | (fp)<<16 | (cpu)<<12) /* arm → FP */
|
||||
|
||||
TEXT setfcr(SB), $4
|
||||
MOVW R0, FPCR
|
||||
#define Fpscr 1
|
||||
|
||||
TEXT setfcr(SB), $0
|
||||
VMSR(0, Fpscr)
|
||||
RET
|
||||
|
||||
TEXT getfcr(SB), $4
|
||||
MOVW FPCR, R0
|
||||
TEXT getfcr(SB), $0
|
||||
VMRS(Fpscr, 0)
|
||||
RET
|
||||
|
||||
TEXT getfsr(SB), $0
|
||||
MOVW FPSR, R0
|
||||
VMSR(0, Fpscr)
|
||||
RET
|
||||
|
||||
TEXT setfsr(SB), $0
|
||||
MOVW R0, FPSR
|
||||
VMRS(Fpscr, 0)
|
||||
RET
|
||||
|
|
Loading…
Reference in a new issue