From e38330f8b00e641e397260e9cecb2070ac2d1477 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 28 Nov 2021 00:18:18 -0500 Subject: sim: iq2000/lm32/m32c/moxie/rx: switch to new target-newlib-syscall.h Use the new target-newlib-syscall.h to provide the target syscall defines. These code paths are written specifically for the newlib ABI rather than being generalized, so switching them to the defines rather than trying to go through the dynamic callback conversion seems like the best trade-off for now. Might have to reconsider this in the future. --- sim/iq2000/iq2000.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sim/iq2000') diff --git a/sim/iq2000/iq2000.c b/sim/iq2000/iq2000.c index 362cc4a..88de5ac 100644 --- a/sim/iq2000/iq2000.c +++ b/sim/iq2000/iq2000.c @@ -27,7 +27,7 @@ #include "sim-signal.h" #include "cgen-mem.h" #include "cgen-ops.h" -#include "targ-vals.h" +#include "target-newlib-syscall.h" #include enum @@ -80,7 +80,7 @@ do_syscall (SIM_CPU *current_cpu, PCADDR pc) exit (1); } - case TARGET_SYS_write: + case TARGET_NEWLIB_SYS_write: buf = zalloc (PARM3); sim_read (CPU_STATE (current_cpu), CPU2DATA(PARM2), buf, PARM3); SET_H_GR (ret_reg, @@ -89,18 +89,18 @@ do_syscall (SIM_CPU *current_cpu, PCADDR pc) free (buf); break; - case TARGET_SYS_lseek: + case TARGET_NEWLIB_SYS_lseek: SET_H_GR (ret_reg, sim_io_lseek (CPU_STATE (current_cpu), PARM1, PARM2, PARM3)); break; - case TARGET_SYS_exit: + case TARGET_NEWLIB_SYS_exit: sim_engine_halt (CPU_STATE (current_cpu), current_cpu, NULL, pc, sim_exited, PARM1); break; - case TARGET_SYS_read: + case TARGET_NEWLIB_SYS_read: buf = zalloc (PARM3); SET_H_GR (ret_reg, sim_io_read (CPU_STATE (current_cpu), @@ -109,7 +109,7 @@ do_syscall (SIM_CPU *current_cpu, PCADDR pc) free (buf); break; - case TARGET_SYS_open: + case TARGET_NEWLIB_SYS_open: buf = fetch_str (current_cpu, pc, PARM1); SET_H_GR (ret_reg, sim_io_open (CPU_STATE (current_cpu), @@ -117,12 +117,12 @@ do_syscall (SIM_CPU *current_cpu, PCADDR pc) free (buf); break; - case TARGET_SYS_close: + case TARGET_NEWLIB_SYS_close: SET_H_GR (ret_reg, sim_io_close (CPU_STATE (current_cpu), PARM1)); break; - case TARGET_SYS_time: + case TARGET_NEWLIB_SYS_time: SET_H_GR (ret_reg, time (0)); break; -- cgit v1.1