gdb/testsuite/

* gdb.asm/sh.inc (gdbasm_startup): Only set up the stack pointer if the
	symbol _stack is defined.  Get rid of a hard-coded constant for _stack.
This commit is contained in:
Thomas Schwinge 2012-04-16 08:02:09 +00:00
parent cbf68a605b
commit dd6d3b70d9
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2012-04-16 Thomas Schwinge <thomas@codesourcery.com>
* gdb.asm/sh.inc (gdbasm_startup): Only set up the stack pointer if the
symbol _stack is defined. Get rid of a hard-coded constant for _stack.
* gdb.asm/sh.inc (gdbasm_end) <.size>: Refer to the function's name.
2012-04-14 Anton Gorenkov <xgsa@yandex.ru>

View File

@ -65,13 +65,19 @@
comment "crt0 startup"
.macro gdbasm_startup
mov.l .stackaddr,r15
comment "If there is a _stack symbol, use it for setting up the stack"
comment "pointer. In hosted mode (when there is no _stack symbol),"
comment "the operating system will have initialized it already."
mov.l .stackaddr, r0
tst r0, r0
bt .afterstackaddr
mov r0, r15
bra .afterstackaddr
nop
nop
.align 2
.stackaddr:
.long 196608 ! 0x30000
.weak _stack
.long _stack
.align 1
.afterstackaddr:
.endm