From aa9c5aa55931133d231a0e3a62f854fe821089a1 Mon Sep 17 00:00:00 2001 From: kub Date: Mon, 21 Nov 2022 21:19:34 +0000 Subject: [PATCH] sh2 drc, minor fix for arg passing in calls from generated to C code --- cpu/drc/emit_arm64.c | 4 ++-- cpu/drc/emit_mips.c | 4 ++-- cpu/drc/emit_ppc.c | 4 ++-- cpu/drc/emit_riscv.c | 4 ++-- cpu/drc/emit_x86.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpu/drc/emit_arm64.c b/cpu/drc/emit_arm64.c index d61bab2a..855e22dd 100644 --- a/cpu/drc/emit_arm64.c +++ b/cpu/drc/emit_arm64.c @@ -1065,10 +1065,10 @@ static void emith_ldst_offs(int sz, int rd, int rn, int o9, int ld, int mode) rd = arg #define emith_pass_arg_r(arg, reg) \ - emith_move_r_r(arg, reg) + emith_move_r_r_ptr(arg, reg) #define emith_pass_arg_imm(arg, imm) \ - emith_move_r_imm(arg, imm) + emith_move_r_ptr_imm(arg, imm) // branching; NB: A64 B.cond has only +/- 1MB range diff --git a/cpu/drc/emit_mips.c b/cpu/drc/emit_mips.c index a65f1204..b4100c66 100644 --- a/cpu/drc/emit_mips.c +++ b/cpu/drc/emit_mips.c @@ -1397,10 +1397,10 @@ static void emith_lohi_nops(void) rd = (arg+4) #define emith_pass_arg_r(arg, reg) \ - emith_move_r_r(arg, reg) + emith_move_r_r_ptr(arg, reg) #define emith_pass_arg_imm(arg, imm) \ - emith_move_r_imm(arg, imm) + emith_move_r_ptr_imm(arg, imm) // branching #define emith_invert_branch(cond) /* inverted conditional branch */ \ diff --git a/cpu/drc/emit_ppc.c b/cpu/drc/emit_ppc.c index db52c9ae..432583e1 100644 --- a/cpu/drc/emit_ppc.c +++ b/cpu/drc/emit_ppc.c @@ -1311,10 +1311,10 @@ static void emith_add_imm(int rt, int ra, u32 imm) rt = (arg+3) #define emith_pass_arg_r(arg, reg) \ - emith_move_r_r(arg, reg) + emith_move_r_r_ptr(arg, reg) #define emith_pass_arg_imm(arg, imm) \ - emith_move_r_imm(arg, imm) + emith_move_r_ptr_imm(arg, imm) // branching #define emith_invert_branch(cond) /* inverted conditional branch */ \ diff --git a/cpu/drc/emit_riscv.c b/cpu/drc/emit_riscv.c index 35ee0168..840973f2 100644 --- a/cpu/drc/emit_riscv.c +++ b/cpu/drc/emit_riscv.c @@ -1190,10 +1190,10 @@ static void emith_st_offs(int sz, int rt, int rs, int o12) rd = (arg+10) #define emith_pass_arg_r(arg, reg) \ - emith_move_r_r(arg, reg) + emith_move_r_r_ptr(arg, reg) #define emith_pass_arg_imm(arg, imm) \ - emith_move_r_imm(arg, imm) + emith_move_r_ptr_imm(arg, imm) // branching #define emith_invert_branch(cond) /* inverted conditional branch */ \ diff --git a/cpu/drc/emit_x86.c b/cpu/drc/emit_x86.c index 06612710..c24370ed 100644 --- a/cpu/drc/emit_x86.c +++ b/cpu/drc/emit_x86.c @@ -1035,7 +1035,7 @@ enum { xAX = 0, xCX, xDX, xBX, xSP, xBP, xSI, xDI, // x86-64,i386 common #define emith_pass_arg_imm(arg, imm) do { \ int rd = 7; \ host_arg2reg(rd, arg); \ - emith_move_r_imm(rd, imm); \ + emith_move_r_ptr_imm(rd, imm); \ } while (0) #define host_instructions_updated(base, end, force) (void)(base),(void)(end) -- 2.39.5