diff options
author | Fernando Nasser <fnasser@redhat.com> | 2000-03-23 20:19:13 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2000-03-23 20:19:13 +0000 |
commit | 7684ddaf52dcd793d118eab22c8ffafc0b955373 (patch) | |
tree | 518d07f766bc66c9c591e9e0842573d063f50d4d /newlib | |
parent | b8ec20c809b80afbd9fff9e994de3ec76dbfdf33 (diff) | |
download | newlib-7684ddaf52dcd793d118eab22c8ffafc0b955373.zip newlib-7684ddaf52dcd793d118eab22c8ffafc0b955373.tar.gz newlib-7684ddaf52dcd793d118eab22c8ffafc0b955373.tar.bz2 |
Thu Mar 22 14:57:00 2000 Fernando Nasser <fnasser@redhat.com>
* libc/sys/arm/syscalls.c (do_AngelSWI): Prevent registers with valid
information to be clobbered by an Angel C library support syscall.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/sys/arm/syscalls.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 0257852..21b9997 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 22 14:57:00 2000 Fernando Nasser <fnasser@redhat.com> + + * libc/sys/arm/syscalls.c (do_AngelSWI): Prevent registers with valid + information to be clobbered by an Angel C library support syscall. + Tue Mar 21 19:08:00 2000 Jeff Johnston <jjohnstn@cygnus.com> * libc/stdlib/envlock.c: Fixed comment typo. diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c index fb190e1..2fb2ae1 100644 --- a/newlib/libc/sys/arm/syscalls.c +++ b/newlib/libc/sys/arm/syscalls.c @@ -103,8 +103,13 @@ do_AngelSWI (int reason, void * arg) asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0" : "=r" (value) /* Outputs */ : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */ - : "r0", "r1", "lr" + : "r0", "r1", "r2", "r3", "ip", "lr", "memory" /* Clobbers r0 and r1, and lr if in supervisor mode */); + /* Accordingly to page 13-77 of ARM DUI 0040D other registers + can also be clobbered. Some memory positions may also be + changed by a system call, so they should not be kept in + registers. Note: we are assuming the manual is right and + Angel is respecting the APCS */ return value; } #endif /* ARM_RDI_MONITOR */ |