summaryrefslogtreecommitdiff
path: root/sim/iq2000
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-28 00:18:18 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-28 13:23:58 -0500
commite38330f8b00e641e397260e9cecb2070ac2d1477 (patch)
treec90b41f37cd4f9fd1139c8336ac0042d84d862da /sim/iq2000
parent64ae70dde5bc8916800bbdb570d6281b700f7e84 (diff)
downloadbinutils-gdb-e38330f8b00e641e397260e9cecb2070ac2d1477.tar.gz
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.
Diffstat (limited to 'sim/iq2000')
-rw-r--r--sim/iq2000/iq2000.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sim/iq2000/iq2000.c b/sim/iq2000/iq2000.c
index 362cc4acb19..88de5ac6f5c 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 <stdlib.h>
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;