diff options
author | tschwinge <tschwinge> | 2012-04-16 08:02:09 +0000 |
---|---|---|
committer | tschwinge <tschwinge> | 2012-04-16 08:02:09 +0000 |
commit | 3fd2c5b6bb1c315022cbe99414b1e6672a7ed93b (patch) | |
tree | 229d017eb68dc24499fdc1b0a47e6136d847bf20 /gdb/testsuite/gdb.asm | |
parent | afe00b76d1c37d95eabf9daaffd1be57db577215 (diff) | |
download | gdb-3fd2c5b6bb1c315022cbe99414b1e6672a7ed93b.tar.gz |
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.
Diffstat (limited to 'gdb/testsuite/gdb.asm')
-rw-r--r-- | gdb/testsuite/gdb.asm/sh.inc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc index 8816cb4aa02..a4a5fc545e4 100644 --- a/gdb/testsuite/gdb.asm/sh.inc +++ b/gdb/testsuite/gdb.asm/sh.inc @@ -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 |