summaryrefslogtreecommitdiffhomepage
path: root/ir/be/riscv/riscv_cconv.c
diff options
context:
space:
mode:
authorJohannes Bucher <johannes.bucher2@student.kit.edu>2019-06-07 17:47:34 +0200
committerJohannes Bucher <johannes.bucher2@student.kit.edu>2019-06-11 16:34:58 +0200
commit3115f120a9a6e11e2a152af65d6e1e1943d68d33 (patch)
tree8776b48c841090d3199f899671a1bf5a92d6d188 /ir/be/riscv/riscv_cconv.c
parent00b6721751d2c9d227dfc23e0fd580f920d33a25 (diff)
riscv: fix function prologue + epilogue
Diffstat (limited to 'ir/be/riscv/riscv_cconv.c')
-rw-r--r--ir/be/riscv/riscv_cconv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/riscv/riscv_cconv.c b/ir/be/riscv/riscv_cconv.c
index 349a5f9..fea096c 100644
--- a/ir/be/riscv/riscv_cconv.c
+++ b/ir/be/riscv/riscv_cconv.c
@@ -69,12 +69,12 @@ void riscv_determine_calling_convention(riscv_calling_convention_t *const cconv,
++gp_param;
if (gp_param < ARRAY_SIZE(regs_param_gp))
params[i].reg = &riscv_registers[regs_param_gp[gp_param]];
- params[i].offset = (gp_param - ARRAY_SIZE(regs_param_gp)) * (RISCV_MACHINE_SIZE / 8);
+ params[i].offset = (gp_param - ARRAY_SIZE(regs_param_gp)) * RISCV_REGISTER_SIZE;
++gp_param;
}
}
}
- cconv->param_stack_size = gp_param * (RISCV_MACHINE_SIZE / 8);
+ cconv->param_stack_size = gp_param * RISCV_REGISTER_SIZE;
cconv->n_mem_param = gp_param > ARRAY_SIZE(regs_param_gp) ? gp_param - ARRAY_SIZE(regs_param_gp) : 0;
cconv->parameters = params;