4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00
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
..
2017-06-14 14:51:22 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2016-08-19 10:32:23 +02:00
2018-01-17 11:47:26 -06:00
2010-12-17 10:13:31 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2008-04-04 21:52:01 +00:00
2008-04-04 21:52:01 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2008-04-04 21:52:01 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2008-04-04 21:52:01 +00:00
2018-01-18 09:21:10 +01:00
2018-01-17 11:47:26 -06:00
2000-03-17 22:48:54 +00:00
2018-01-17 11:47:26 -06:00
2008-04-04 21:52:01 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2017-08-17 14:51:05 -04:00
2017-08-17 14:51:05 -04:00
2000-03-17 22:48:54 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2000-03-17 22:48:54 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2017-10-09 19:03:52 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2000-03-17 22:48:54 +00:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00

bfin	- Analog Devices Blackfin processor.
sparc	- Fujitsu Sparclite board. Works on the ex930, ex931, ex933
hp74x	- Hewlett Packard HP742 board. Also some support for the hp743.
m68hc11 - Motorola 68HC11 or 68HC12 support.
m68k	- Motorola MVME135 and IDP board. For CPU32 systems.
mep	- Toshiba Media Processor.
pa	- WinBond and Oki boards with a PA.
mips	- R3000 support. Array Tech LSI33k based RAID disk controller.
lm32    - Lattice Mico32 simulator.
epiphany - Adapteva Epiphany multicore processor.
or1k	- OpenRISC 1000 processor.