aboutsummaryrefslogtreecommitdiff
path: root/sim/rx
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/rx
parent64ae70dde5bc8916800bbdb570d6281b700f7e84 (diff)
downloadfsf-binutils-gdb-e38330f8b00e641e397260e9cecb2070ac2d1477.zip
fsf-binutils-gdb-e38330f8b00e641e397260e9cecb2070ac2d1477.tar.gz
fsf-binutils-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/rx')
-rw-r--r--sim/rx/syscalls.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sim/rx/syscalls.c b/sim/rx/syscalls.c
index 1981b5d..a18c104 100644
--- a/sim/rx/syscalls.c
+++ b/sim/rx/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;
@@ -146,10 +146,10 @@ rx_syscall (int id)
argp = 0;
stackp = 4;
if (trace)
- printf ("\033[31m/* SYSCALL(%d) = %s */\033[0m\n", id, id <= TARGET_SYS_link ? callnames[id] : "unknown");
+ printf ("\033[31m/* SYSCALL(%d) = %s */\033[0m\n", id, id <= TARGET_NEWLIB_SYS_link ? callnames[id] : "unknown");
switch (id)
{
- case TARGET_SYS_exit:
+ case TARGET_NEWLIB_SYS_exit:
{
int ec = arg ();
if (verbose)
@@ -158,7 +158,7 @@ rx_syscall (int id)
}
break;
- case TARGET_SYS_open:
+ case TARGET_NEWLIB_SYS_open:
{
int oflags, cflags;
int path = arg ();
@@ -200,7 +200,7 @@ rx_syscall (int id)
}
break;
- case TARGET_SYS_close:
+ case TARGET_NEWLIB_SYS_close:
{
int fd = arg ();
@@ -216,7 +216,7 @@ rx_syscall (int id)
}
break;
- case TARGET_SYS_read:
+ case TARGET_NEWLIB_SYS_read:
{
int fd = arg ();
int addr = arg ();
@@ -236,7 +236,7 @@ rx_syscall (int id)
}
break;
- case TARGET_SYS_write:
+ case TARGET_NEWLIB_SYS_write:
{
int fd = arg ();
int addr = arg ();
@@ -259,11 +259,11 @@ rx_syscall (int id)
}
break;
- case TARGET_SYS_getpid:
+ case TARGET_NEWLIB_SYS_getpid:
put_reg (1, 42);
break;
- case TARGET_SYS_gettimeofday:
+ case TARGET_NEWLIB_SYS_gettimeofday:
{
int tvaddr = arg ();
struct timeval tv;
@@ -278,7 +278,7 @@ rx_syscall (int id)
}
break;
- case TARGET_SYS_kill:
+ case TARGET_NEWLIB_SYS_kill:
{
int pid = arg ();
int sig = arg ();