newlib-cygwin/libgloss/arm
Tamar Christina 430b529111 Fix AArch32 semihosting SYS_EXIT call on semihosting v1.
The current SYS_EXIT has a bug that when making the call it always uses
the v2 calling convention.  This is undefined behavior according to the
semihosting specification:
https://developer.arm.com/docs/100863/latest/semihosting-operations/sys_exit-0x18

This patch fixes it by making sure v1 passes the argument directly in the register instead
of in a block. And for v2 it does the same if the v2 extension isn't supported.

The sequence generated now is

   12424:       ebfffecd        bl      11f60 <_has_ext_exit_extended>
   12428:       e3500000        cmp     r0, #0
   1242c:       11a0500d        movne   r5, sp
   12430:       059d5000        ldreq   r5, [sp]
   12434:       e1a00004        mov     r0, r4
   12438:       e1a01005        mov     r1, r5
   1243c:       ef00f000        svc     0x0000f000

Signed-off-by: Tamar Christina <tamar.christina@arm.com>
2018-07-11 17:18:04 +02:00
..
cpu-init Initializing TTBR0 to inner/outer WB 2016-03-26 12:45:07 +01:00
Makefile.in Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
_exit.c ansification: remove _PARAMS 2018-01-17 11:47:13 -06:00
_kill.c Fix AArch32 semihosting SYS_EXIT call on semihosting v1. 2018-07-11 17:18:04 +02:00
aclocal.m4 2006-04-19 Jeff Johnston <jjohnstn@redhat.com> 2006-04-19 19:44:05 +00:00
arm.h Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
coff-iq80310.specs
coff-pid.specs
coff-rdimon-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
coff-rdimon.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
coff-rdpmon.specs 2004-06-09 Toralf Lund <toralf@procaptura.com> 2004-06-09 19:06:50 +00:00
coff-redboot.ld
coff-redboot.specs
configure libgloss/arm: fix discovery of "eabihf" toolchains 2017-04-18 12:24:42 +02:00
configure.in libgloss/arm: fix discovery of "eabihf" toolchains 2017-04-18 12:24:42 +02:00
crt0.S ARM/AArch64: Fix GetCmdLine semihosting directives 2017-05-19 15:45:58 -04:00
elf-aprofile-validation-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-aprofile-validation.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-aprofile-ve-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-aprofile-ve.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-iq80310.specs
elf-linux.specs 2006-06-23 Shaun Jackman <sjackman@gmail.com> 2006-06-23 16:27:34 +00:00
elf-nano.specs Fix elf-nano.specs to work without -save-temps 2017-02-15 16:31:16 +01:00
elf-pid.specs
elf-rdimon-v2m.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-rdimon.specs Add the needed build system changes in order to compile and create the new libraries for Semihosting v2 for ARM. 2017-07-05 14:41:27 +02:00
elf-rdpmon.specs 2004-06-09 Toralf Lund <toralf@procaptura.com> 2004-06-09 19:06:50 +00:00
elf-redboot.ld * arm/elf-redboot.ld, iq2000/sim.ld, m68hc11/sim-valid-m68hc11.ld, 2005-05-20 15:45:45 +00:00
elf-redboot.specs
ftruncate.c [ARM] set errno in ftruncate and truncate stubs. 2013-11-21 15:49:05 +00:00
libcfunc.c * arm/licfunc.c (do_AngelSWI): Remove. 2006-12-25 23:05:24 +00:00
linux-crt0.c add forward declaration to main() to prevent warnings 2018-02-16 12:16:08 +01:00
linux-syscall.h 2006-05-30 Shaun Jackman <sjackman@gmail.com> 2006-05-30 17:40:47 +00:00
linux-syscalls0.S * arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4): 2009-10-26 10:00:41 +00:00
linux-syscalls1.c 2006-06-05 Shaun Jackman <sjackman@gmail.com> 2006-06-05 20:15:23 +00:00
redboot-crt0.S Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
redboot-syscalls.c 2008-01-03 Jeff Johnston <jjohnstn@redhat.com> 2008-01-03 22:38:31 +00:00
swi.h ansification: remove _PARAMS 2018-01-17 11:47:13 -06:00
syscall.h libgloss: arm: fix copy & paste in syscall.h 2015-04-23 22:03:45 +02:00
syscalls.c adapt prototypes arm/syscalls.c to usual prototypes, and do not rely on implicit conversions 2018-02-16 12:16:07 +01:00
trap.S Make macro checks ARMv8-M baseline proof 2016-01-28 11:26:37 +01:00
truncate.c [ARM] set errno in ftruncate and truncate stubs. 2013-11-21 15:49:05 +00:00