1

I'm trying to get the following machine code instruction written in ARMv7 Assembly

1010 1110 00001011 0000 0000 0000 0100

I wrote it out in hex as below

0xAE0B0004

After messing about with several different instructions with ARMSim, I finally got down to:

andge r0,r11,#4

However this produces the hex machine code

0xA20B0004

I'm still getting the second nibble incorrectly, I tried to use the Coprocessor instruction but I'm unsure why ARMSim is not recognizing the command. Here is my CDP command:

cdpge 0,and,r0,r11,#4,#0

Any help would be greatly appreciated.

4

1 回答 1

1

我创建了这个名为 aa.S 的文件:

    .globl test
test:
    .text
    .word 0xAE0B0004

由 arm-none-eabi-gcc -c aa.S -o aa.o 组装而成。然后做了 arm-none-eabi-objdump -d aa.o 并得到了这个:

00000000 测试:

0: ae0b0004 cdpge 0, 0, cr0, cr11, cr4, {0}

于 2015-02-17T09:42:23.577 回答