Public bug reported:

Binary package hint: spim

Ubuntu: Ubuntu 8.10
Spim: 7.4-0ubuntu1

When tested with the -bare option, the following code could will produce
a result of 0xCAFE for $t0 and 0x03 for $t1. Yet, with a simple analysis
of the code, it is clear that it's impossible to have both at the same
time. My claim is sustained by the fact that after the beq instruction
is triggered, the delay slot is already being executed, therefore j is
also triggered. But the ori $t0, $zero, 0xCAFE statement should not be
triggered (in j's delay slot) if the jump was made to endbeq. Both
cannot happen. Best regards.

                .text
                .globl  main

main:           ori     $t0, $zero, 0xFACE
                ori     $t1, $zero, 0x0000
                beq     $zero, $zero, endbeq
                j       endj
                ori     $t0, $zero, 0xCAFE

endbeq:         ori     $t1, $t1, 0x01
endj:           ori     $t1, $t1, 0x02

** Affects: spim (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Strange behavior with -bare option
https://bugs.launchpad.net/bugs/393072
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to