RTEMS stack + TSIM-LEON2 weird behaviour
Aitor.Viana.Sanchez at esa.int
Aitor.Viana.Sanchez at esa.int
Tue May 6 08:16:46 UTC 2008
Hi all,
I've got some weird (for me) when executing the rtems-hello example in the
tsim-leon2 professional version.
The example is from the rtems-4.7.99.2-1.0.3 version.
and the compiling options CFLAGS="-msoft-float -qleon2".
OK, If I compile the example and disassemble it I got this:
40000000 <_text_start>:
40000000: a0 10 00 00 mov %g0, %l0
40000004: 29 10 00 04 sethi %hi(0x40001000), %l4
40000008: 81 c5 20 00 jmp %l4
4000000c: a6 10 20 00 clr %l3
40000010: 91 d0 20 00 ta 0
Now I execute the tsim-leon and put a break point in the 0x40000004
address
TSIM/LEON SPARC simulator, version 1.3.5 (professional version)
Copyright (C) 2001, Gaisler Research - all rights reserved.
For latest updates, go to http://www.gaisler.com/
Comments or bug-reports to tsim at gaisler.com
using 64-bit time
serial port A on stdin/stdout
allocated 4096 K RAM memory, in 1 bank(s)
allocated 2048 K ROM memory
icache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
dcache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
section: .text, addr: 0x40000000, size 75936 bytes
section: .data, addr: 0x400128a0, size 3520 bytes
section: .jcr, addr: 0x40013660, size 4 bytes
read 424 symbols
tsim> +bp 0x40000004
breakpoint 1 at 0x40000004: start + 0x4
tsim>
I want to check the registers:
tsim> re
INS LOCALS OUTS GLOBALS
0: 00000000 00000000 00000000 00000000
1: 00000000 00000000 00000000 00000000
2: 00000000 00000000 00000000 00000000
3: 00000000 00000000 00000000 00000000
4: 00000000 00000000 00000000 00000000
5: 00000000 00000000 00000000 00000000
6: 00000000 00000000 00000000 00000000
7: 00000000 00000000 00000000 00000000
psr: 00000080 wim: 00000000 tbr: 00000000 y: 00000000
pc: 00000000 00000000 unimp
npc: 00000004 00000000 unimp
tsim>
Everything ok.
I start the execution
tsim> g
resuming at 0x40000000
breakpoint 1 start + 0x4
tsim>
and I check again the registers
tsim> re
INS LOCALS OUTS GLOBALS
0: 00000000 00000000 00000000 00000000
1: 00000000 00000000 00000000 00000000
2: 00000000 00000000 00000000 00000000
3: 00000000 00000000 00000000 00000000
4: 00000000 00000000 00000000 00000000
5: 00000000 00000000 00000000 00000000
6: 40400000 00000000 403FFE80 00000000
7: 00000000 00000000 00000000 00000000
psr: 000010E0 wim: 00000002 tbr: 00000000 y: 00000000
pc: 40000004 29100004 sethi %hi(0x40001000), %l4
npc: 40000008 81c52000 jmp %l4
tsim>
I think only ONE instruction should have been executed (40000000: a0
10 00 00 mov %g0, %l0) but we can see that the %sp registers is
already set. Who set this register up?
Cheers,
Aitor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20080506/e52eb1d6/attachment-0001.html>
More information about the users
mailing list