Y86 .long -5 being sent from memory to register as -1

117 views Asked by At

In my code, whenever I import a negative number from the input array to a different register, the value is always 0xFFFFFFFF regardless of what the negative number is. Has anyone else ran into this issue? Here is the code:

.pos 0x200
.align 4
InputArray: .long -5
            .long -10
Done:       .long 0x0

.pos 0x0
    irmovl InputArray, %eax
    ...
    mrmovl (%eax),%ebx #here is where %ebx gets assigned 0xFFFFFFFF instead of 0xFFFFFFFB

I am compiling the code with yas and testing with ssim.

1

There are 1 answers

0
brostone51 On BEST ANSWER

I've been informed from my instructor that this is a common error with the graphical interface in ssim, where all negative numbers appear to be negative 1. Although it appears wrong, the values are actually correct.