changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / sys/src/ape/lib/9/arm64/getfcr.s

changeset 7190: 41fb44a3b2dc
author: cinap_lenrek@felloff.net
date: Fri, 03 May 2019 21:06:46 +0200
permissions: -rw-r--r--
description: ape: initial support for arm64
1 #define SYSARG5(op0,op1,Cn,Cm,op2) ((op0)<<19|(op1)<<16|(Cn)<<12|(Cm)<<8|(op2)<<5)
2 
3 #define FPCR SPR(SYSARG5(3,3,4,4,0))
4 #define FPSR SPR(SYSARG5(3,3,4,4,1))
5 
6 TEXT setfcr(SB), $0
7  MSR R0, FPCR
8  RETURN
9 
10 TEXT getfcr(SB), $0
11  MRS FPCR, R0
12  RETURN
13 
14 TEXT getfsr(SB), $0
15  MRS FPSR, R0
16  RETURN
17 
18 TEXT setfsr(SB), $0
19  MSR R0, FPSR
20  RETURN
21