<br><font size=2 face="sans-serif">Hi all,</font>
<br>
<br><font size=2 face="sans-serif">I've got some weird (for me) when executing
the rtems-hello example in the tsim-leon2 professional version.</font>
<br>
<br><font size=2 face="sans-serif">The example is from the rtems-4.7.99.2-1.0.3
version.</font>
<br>
<br><font size=2 face="sans-serif">and the compiling options CFLAGS="-msoft-float
-qleon2".</font>
<br>
<br><font size=2 face="sans-serif">OK, If I compile the example and disassemble
it I got this:</font>
<br>
<br><font size=2 face="sans-serif">40000000 <_text_start>:</font>
<br><font size=2 face="sans-serif">40000000: a0 10
00 00 mov %g0, %l0</font>
<br><font size=2 face="sans-serif">40000004: 29 10
00 04 sethi %hi(0x40001000), %l4</font>
<br><font size=2 face="sans-serif">40000008: 81 c5
20 00 jmp %l4</font>
<br><font size=2 face="sans-serif">4000000c: a6 10
20 00 clr %l3</font>
<br><font size=2 face="sans-serif">40000010: 91 d0
20 00 ta 0</font>
<br>
<br><font size=2 face="sans-serif">Now I execute the tsim-leon and put
a break point in the 0x40000004 address</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif"> TSIM/LEON SPARC simulator, version
1.3.5 (professional version)</font>
<br>
<br><font size=2 face="sans-serif"> Copyright (C) 2001, Gaisler Research
- all rights reserved.</font>
<br><font size=2 face="sans-serif"> For latest updates, go to http://www.gaisler.com/</font>
<br><font size=2 face="sans-serif"> Comments or bug-reports to tsim@gaisler.com</font>
<br>
<br><font size=2 face="sans-serif">using 64-bit time</font>
<br><font size=2 face="sans-serif">serial port A on stdin/stdout</font>
<br><font size=2 face="sans-serif">allocated 4096 K RAM memory, in 1 bank(s)</font>
<br><font size=2 face="sans-serif">allocated 2048 K ROM memory</font>
<br><font size=2 face="sans-serif">icache: 1 * 4 kbytes, 16 bytes/line
(4 kbytes total)</font>
<br><font size=2 face="sans-serif">dcache: 1 * 4 kbytes, 16 bytes/line
(4 kbytes total)</font>
<br><font size=2 face="sans-serif">section: .text, addr: 0x40000000, size
75936 bytes</font>
<br><font size=2 face="sans-serif">section: .data, addr: 0x400128a0, size
3520 bytes</font>
<br><font size=2 face="sans-serif">section: .jcr, addr: 0x40013660, size
4 bytes</font>
<br><font size=2 face="sans-serif">read 424 symbols</font>
<br><font size=2 face="sans-serif">tsim> +bp 0x40000004</font>
<br><font size=2 face="sans-serif">breakpoint 1 at 0x40000004: start
+ 0x4</font>
<br><font size=2 face="sans-serif">tsim> </font>
<br>
<br>
<br><font size=2 face="sans-serif">I want to check the registers:</font>
<br>
<br><font size=2 face="sans-serif">tsim> re</font>
<br>
<br><font size=2 face="sans-serif"> INS
LOCALS OUTS GLOBALS</font>
<br><font size=2 face="sans-serif"> 0: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 1: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 2: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 3: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 4: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 5: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 6: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 7: 00000000
00000000 00000000 00000000</font>
<br>
<br><font size=2 face="sans-serif"> psr: 00000080 wim: 00000000
tbr: 00000000 y: 00000000</font>
<br>
<br><font size=2 face="sans-serif"> pc: 00000000 00000000
unimp</font>
<br><font size=2 face="sans-serif"> npc: 00000004 00000000 unimp</font>
<br><font size=2 face="sans-serif">tsim> </font>
<br>
<br><font size=2 face="sans-serif">Everything ok. </font>
<br>
<br><font size=2 face="sans-serif">I start the execution</font>
<br>
<br><font size=2 face="sans-serif">tsim> g</font>
<br><font size=2 face="sans-serif">resuming at 0x40000000</font>
<br>
<br><font size=2 face="sans-serif">breakpoint 1 start + 0x4</font>
<br><font size=2 face="sans-serif">tsim> </font>
<br>
<br><font size=2 face="sans-serif">and I check again the registers</font>
<br>
<br><font size=2 face="sans-serif">tsim> re</font>
<br>
<br><font size=2 face="sans-serif"> INS
LOCALS OUTS GLOBALS</font>
<br><font size=2 face="sans-serif"> 0: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 1: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 2: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 3: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 4: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 5: 00000000
00000000 00000000 00000000</font>
<br><font size=2 face="sans-serif"> 6: 40400000
00000000 403FFE80 00000000</font>
<br><font size=2 face="sans-serif"> 7: 00000000
00000000 00000000 00000000</font>
<br>
<br><font size=2 face="sans-serif"> psr: 000010E0 wim: 00000002
tbr: 00000000 y: 00000000</font>
<br>
<br><font size=2 face="sans-serif"> pc: 40000004 29100004
sethi %hi(0x40001000), %l4</font>
<br><font size=2 face="sans-serif"> npc: 40000008 81c52000 jmp
%l4</font>
<br>
<br>
<br><font size=2 face="sans-serif">tsim></font>
<br>
<br><font size=2 face="sans-serif">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?</font>
<br>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Cheers,</font>
<br>
<br><font size=2 face="sans-serif">Aitor</font>
<br>
<br>