summary refs log tree commit diff
path: root/rv64/all.h
diff options
context:
space:
mode:
authorAlexey Yerin <yyp@disroot.org>2022-06-12 22:29:32 +0300
committerQuentin Carbonneaux <quentin@c9x.me>2022-06-14 09:12:19 +0200
commit1162359a198ab6a18a734cb9f7955d0b28e342b6 (patch)
treea4ec5b9c106bb9c2b14b87150b16dae2664e5565 /rv64/all.h
parentc9f04db881e8ec0bb0beeba6274a5755c46cb534 (diff)
downloadroux-1162359a198ab6a18a734cb9f7955d0b28e342b6.tar.gz
rv64: implement Oswap for floating-point types
Diffstat (limited to 'rv64/all.h')
-rw-r--r--rv64/all.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/rv64/all.h b/rv64/all.h
index eb2daa9..a03973c 100644
--- a/rv64/all.h
+++ b/rv64/all.h
@@ -11,22 +11,25 @@ enum Rv64Reg {
 	S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11,
 
 	/* globally live */
-	FP, SP, GP, TP, RA, T6,
+	FP, SP, GP, TP, RA,
 
 	/* FP caller-save */
-	FT0, FT1, FT2, FT3, FT4, FT5, FT6, FT7, FT8, FT9, FT10, FT11,
+	FT0, FT1, FT2, FT3, FT4, FT5, FT6, FT7, FT8, FT9, FT10,
 	FA0, FA1, FA2, FA3, FA4, FA5, FA6, FA7,
 
 	/* FP callee-save */
 	FS0, FS1, FS2, FS3, FS4, FS5, FS6, FS7, FS8, FS9, FS10, FS11,
 
+	/* reserved (see rv64/emit.c) */
+	T6, FT11,
+
 	NFPR = FS11 - FT0 + 1,
-	NGPR = T6 - T0 + 1,
+	NGPR = RA - T0 + 1,
 	NGPS = A7 - T0 + 1,
 	NFPS = FA7 - FT0 + 1,
 	NCLR = (S11 - S1 + 1) + (FS11 - FS0 + 1),
 };
-MAKESURE(reg_not_tmp, FS11 < (int)Tmp0);
+MAKESURE(reg_not_tmp, FT11 < (int)Tmp0);
 
 struct Rv64Op {
 	char imm;