summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andreas.fried@kit.edu>2021-11-19 16:54:09 +0100
committerAndreas Fried <andreas.fried@kit.edu>2021-12-02 12:57:28 +0100
commitd9c1522b158c096f001e546b08cca63d9cc00c23 (patch)
tree8808f732217c27ab2e20147971752765112b7bf7
parent6860f3c75cbb4af7ed8e482f25ecf973608c166d (diff)
Fix RISC-V register encoding.
-rw-r--r--ir/be/riscv/riscv_spec.pl32
1 files changed, 16 insertions, 16 deletions
diff --git a/ir/be/riscv/riscv_spec.pl b/ir/be/riscv/riscv_spec.pl
index 343eb45..4e89028 100644
--- a/ir/be/riscv/riscv_spec.pl
+++ b/ir/be/riscv/riscv_spec.pl
@@ -25,24 +25,24 @@ my $mode_gp = "mode_Iu";
# (e.g. in cases with low register pressure).
# Registers x8 through x15
- { name => "s0", encoding => 0, type => "compressible" },
- { name => "s1", encoding => 1, type => "compressible" },
- { name => "a0", encoding => 2, type => "compressible" },
- { name => "a1", encoding => 3, type => "compressible" },
- { name => "a2", encoding => 4, type => "compressible" },
- { name => "a3", encoding => 5, type => "compressible" },
- { name => "a4", encoding => 6, type => "compressible" },
- { name => "a5", encoding => 7, type => "compressible" },
+ { name => "s0", encoding => 8, type => "compressible" },
+ { name => "s1", encoding => 9, type => "compressible" },
+ { name => "a0", encoding => 10, type => "compressible" },
+ { name => "a1", encoding => 11, type => "compressible" },
+ { name => "a2", encoding => 12, type => "compressible" },
+ { name => "a3", encoding => 13, type => "compressible" },
+ { name => "a4", encoding => 14, type => "compressible" },
+ { name => "a5", encoding => 15, type => "compressible" },
# Registers x0 through x7
- { name => "zero", encoding => 8 },
- { name => "ra", encoding => 9 },
- { name => "sp", encoding => 10 },
- { name => "gp", encoding => 11 },
- { name => "tp", encoding => 12 },
- { name => "t0", encoding => 13 },
- { name => "t1", encoding => 14 },
- { name => "t2", encoding => 15 },
+ { name => "zero", encoding => 0 },
+ { name => "ra", encoding => 1 },
+ { name => "sp", encoding => 2 },
+ { name => "gp", encoding => 3 },
+ { name => "tp", encoding => 4 },
+ { name => "t0", encoding => 5 },
+ { name => "t1", encoding => 6 },
+ { name => "t2", encoding => 7 },
{ name => "a6", encoding => 16 },
{ name => "a7", encoding => 17 },