aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c
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/m32c
parent64ae70dde5bc8916800bbdb570d6281b700f7e84 (diff)
downloadgdb-e38330f8b00e641e397260e9cecb2070ac2d1477.zip
gdb-e38330f8b00e641e397260e9cecb2070ac2d1477.tar.gz
gdb-e38330f8b00e641e397260e9cecb2070ac2d1477.tar.bz2
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/m32c')
-rw-r--r--sim/m32c/syscalls.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sim/m32c/syscalls.c b/sim/m32c/syscalls.c
index e8d9d2e..e613e51 100644
--- a/sim/m32c/syscalls.c
+++ b/sim/m32c/syscalls.c
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "cpu.h"
#include "mem.h"
#include "syscalls.h"
-#include "targ-vals.h"
+#include "target-newlib-syscall.h"
/* The current syscall callbacks we're using. */
static struct host_callback_struct *callbacks;
@@ -185,7 +185,7 @@ m32c_syscall (int id)
printf ("\033[31m/* SYSCALL(%d) = %s */\033[0m\n", id, callnames[id]);
switch (id)
{
- case TARGET_SYS_exit:
+ case TARGET_NEWLIB_SYS_exit:
{
int ec = arg (2);
if (verbose)
@@ -194,7 +194,7 @@ m32c_syscall (int id)
}
break;
- case TARGET_SYS_open:
+ case TARGET_NEWLIB_SYS_open:
{
int path = arg (PTRSZ);
int oflags = arg (2);
@@ -229,7 +229,7 @@ m32c_syscall (int id)
}
break;
- case TARGET_SYS_close:
+ case TARGET_NEWLIB_SYS_close:
{
int fd = arg (2);
@@ -245,7 +245,7 @@ m32c_syscall (int id)
}
break;
- case TARGET_SYS_read:
+ case TARGET_NEWLIB_SYS_read:
{
int fd = arg (2);
int addr = arg (PTRSZ);
@@ -265,7 +265,7 @@ m32c_syscall (int id)
}
break;
- case TARGET_SYS_write:
+ case TARGET_NEWLIB_SYS_write:
{
int fd = arg (2);
int addr = arg (PTRSZ);
@@ -288,11 +288,11 @@ m32c_syscall (int id)
}
break;
- case TARGET_SYS_getpid:
+ case TARGET_NEWLIB_SYS_getpid:
put_reg (r0, 42);
break;
- case TARGET_SYS_gettimeofday:
+ case TARGET_NEWLIB_SYS_gettimeofday:
{
int tvaddr = arg (PTRSZ);
struct timeval tv;
@@ -307,7 +307,7 @@ m32c_syscall (int id)
}
break;
- case TARGET_SYS_kill:
+ case TARGET_NEWLIB_SYS_kill:
{
int pid = arg (2);
int sig = arg (2);