English 中文(简体)
MIPS中0x00000000与0xFFFFFFFF的比较
原标题:Comparing 0x00000000 with 0xFFFFFFFF in MIPS

我正在尝试使用MIPS汇编程序和xspim。我一直在仔细检查代码中失败的部分,并注意到当将0x00000000与0xFFFFFFFF进行比较时,它并没有将这些数字进行应有的比较。在程序失败时,我在$t3中得到了0x00000000,在$t4中得到了0xFFFFFFFFFFF,看起来是这样的:

bge$t3,$t4,lol#因此,如果t3大于或等于,我应该向前跳,否则继续。现在的问题是,即使t3更小,程序也会跳转。

最佳回答

这是因为0xffffffff被解释为-1,即在2-完成中。

有一些特定的指令可以处理数字,就好像它们是无符号的一样。使用这些说明。(例如,比较bgtbgtu,其中u代表未签名。)

问题回答

暂无回答




相关问题
List of suspected Malicious patterns

I am doing an anti-virus project by disassembling its code and analyzing it. So I want a list of the Suspected Malicious pattern codes, so I can observe which is suspected and which is not? So I want ...

Prefetch for Intel Core 2 Duo

Has anyone had experience using prefetch instructions for the Core 2 Duo processor? I ve been using the (standard?) prefetch set (prefetchnta, prefetcht1, etc) with success for a series of P4 ...

How are mutex and lock structures implemented?

I understand the concept of locks, mutex and other synchronization structures, but how are they implemented? Are they provided by the OS, or are these structures dependent on special CPU instructions ...

Installing GNU Assembler in OSX

No matter how hard I google, I can t seem to find a (relatively) easy-to-follow instruction on how to install the GNU Assembler on a mac. I know I can use gcc -c (Apple Clang on a Mac) to assemble .s ...

8086 assembler,INT 16,2

I got stuck at this thing,I want to see if right shift button has been pressed,so I have this assambler code: mov ah,2 int 16h ;calling INT 16,2 - Read Keyboard Flags interrupt mov ah,...

Translate a FOR to assembler

I need to translate what is commented within the method, to assembler. I have a roughly idea, but can t. Anyone can help me please? Is for an Intel x32 architecture: int secuencia ( int n, ...

热门标签