summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv/riscv_spec.pl
diff options
context:
space:
mode:
authorJohannes Bucher <johannes.bucher2@student.kit.edu>2019-05-07 18:11:03 +0200
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-06-11 16:34:58 +0200
commit98db20e910bc82cc593520d800aab16f16cf4aeb (patch)
tree86091bf19e55110100962f6676a55f7031df01a6 /ir/be/riscv/riscv_spec.pl
parentb7ae14237ed251a098b68e855eb1018a4664f4aa (diff)
riscv: support Alloc nodes
Introduced riscv backend nodes SubSP and SubSPimm for stack allocations
Diffstat (limited to 'ir/be/riscv/riscv_spec.pl')
-rw-r--r--ir/be/riscv/riscv_spec.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/ir/be/riscv/riscv_spec.pl b/ir/be/riscv/riscv_spec.pl
index b36af18..1a0ff7d 100644
--- a/ir/be/riscv/riscv_spec.pl
+++ b/ir/be/riscv/riscv_spec.pl
@@ -247,4 +247,20 @@ FrameAddr => {
attr_type => "riscv_immediate_attr_t",
},
+SubSP => {
+ in_reqs => [ "mem", "sp", "cls-gp" ],
+ ins => [ "mem", "stack", "size" ],
+ out_reqs => [ "sp:I", "cls-gp", "mem" ],
+ outs => [ "stack", "addr", "M" ],
+},
+
+SubSPimm => {
+ in_reqs => [ "mem", "sp" ],
+ ins => [ "mem", "stack" ],
+ out_reqs => [ "sp:I", "cls-gp", "mem" ],
+ outs => [ "stack", "addr", "M" ],
+ attr_type => "riscv_immediate_attr_t",
+ attr => "ir_entity *ent, int32_t val",
+},
+
);