English 中文(简体)
MIPS集会的跳跃
原标题:Strange jump in MIPS assembly

我也许在这里找不到一些确实显而易见的事情,但我已接过了,我已经决定 st。 在以下代码中,只有<代码>2美元! 0美元。 现在,我进行了两倍和三倍的检查,并做了<条码>beq指示(例如,如果我把坡道换到尾,那就行了)。

然而,出于某种原因,<代码>8_$8无论是否执行,均予增减。

lop:   beq $3, $0, end2
       and $2, $3, $4

       sll $3, $3, 1

       beq $2, $0, lop     

       addi $8, $8, 1

       j lop

我不得不承认Im完全 st。

最佳回答

(and <>/code> after the first beq,将始终予以执行。)

科索沃警察部队有明确的输油管危险;在作出分管(或未)的决定之前,以下指示已经通过指导管道取得足够进展,即无论是否执行。 这称为“拖延时间”。

在某些情况下,你可以安排守则加以利用;如果你能够(或不想)的话,你只能将<条码>nop列入以下指示。

某些组装机将重订代号(或填写在nop上),如:gas,全球组装机,除非你指示其不附.set noreorder指令。 但是,在解体时,你仍然需要知道。

如果你在不自动重新排序的情况下重新撰写法典,我建议通知拖延时间,并稍加指责,以表明:

lop:   beq $3, $0, end2
         nop
       and $2, $3, $4

       sll $3, $3, 1

       beq $2, $0, lop     
         nop

       addi $8, $8, 1

       j lop
问题回答




相关问题
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, ...

热门标签