summaryrefslogtreecommitdiffhomepage
path: root/ir/be/TEMPLATE
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-02-24 16:52:10 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2018-02-26 14:02:40 +0100
commit2f1bdf5be2898198e107caed47adf68f7383c43f (patch)
tree1569aeb6a5a8f840b92f12744198ce512c410c59 /ir/be/TEMPLATE
parent2ed291c646ac94c8c725b14bc42ef8c073b8fc3f (diff)
be: Turn the specification of each register class into a map.
So far the mode and flags were in the last magic entry in each register class. Now they are entries in the map and the list of registers is also an entry.
Diffstat (limited to 'ir/be/TEMPLATE')
-rw-r--r--ir/be/TEMPLATE/TEMPLATE_spec.pl80
1 files changed, 42 insertions, 38 deletions
diff --git a/ir/be/TEMPLATE/TEMPLATE_spec.pl b/ir/be/TEMPLATE/TEMPLATE_spec.pl
index 4292f2a..16b1a6b 100644
--- a/ir/be/TEMPLATE/TEMPLATE_spec.pl
+++ b/ir/be/TEMPLATE/TEMPLATE_spec.pl
@@ -30,44 +30,48 @@ $mode_fp = "mode_F"; # mode used by floatingpoint registers
# );
%reg_classes = (
- gp => [
- { name => "r0" },
- { name => "r1" },
- { name => "r2" },
- { name => "r3" },
- { name => "r4" },
- { name => "r5" },
- { name => "r6" },
- { name => "r7" },
- { name => "r8" },
- { name => "r9" },
- { name => "r10" },
- { name => "r11" },
- { name => "r12" },
- { name => "r13" },
- { name => "sp" }, # stackpointer
- { name => "bp" }, # basepointer
- { mode => $mode_gp }
- ],
- fp => [
- { name => "f0" },
- { name => "f1" },
- { name => "f2" },
- { name => "f3" },
- { name => "f4" },
- { name => "f5" },
- { name => "f6" },
- { name => "f7" },
- { name => "f8" },
- { name => "f9" },
- { name => "f10" },
- { name => "f11" },
- { name => "f12" },
- { name => "f13" },
- { name => "f14" },
- { name => "f15" },
- { mode => $mode_fp }
- ]
+ gp => {
+ mode => $mode_gp,
+ registers => [
+ { name => "r0" },
+ { name => "r1" },
+ { name => "r2" },
+ { name => "r3" },
+ { name => "r4" },
+ { name => "r5" },
+ { name => "r6" },
+ { name => "r7" },
+ { name => "r8" },
+ { name => "r9" },
+ { name => "r10" },
+ { name => "r11" },
+ { name => "r12" },
+ { name => "r13" },
+ { name => "sp" }, # stackpointer
+ { name => "bp" }, # basepointer
+ ]
+ },
+ fp => {
+ mode => $mode_fp,
+ registers => [
+ { name => "f0" },
+ { name => "f1" },
+ { name => "f2" },
+ { name => "f3" },
+ { name => "f4" },
+ { name => "f5" },
+ { name => "f6" },
+ { name => "f7" },
+ { name => "f8" },
+ { name => "f9" },
+ { name => "f10" },
+ { name => "f11" },
+ { name => "f12" },
+ { name => "f13" },
+ { name => "f14" },
+ { name => "f15" },
+ ]
+ }
);
my $binop = {