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.

pavel
  • 26,538
  • 10
  • 45
  • 61
v3nd3774
  • 55
  • 2
  • 8

1 Answers1

1

I created this file named aa.S:

    .globl test
test:
    .text
    .word 0xAE0B0004

Assembled it by arm-none-eabi-gcc -c aa.S -o aa.o. Then did arm-none-eabi-objdump -d aa.o and got this:

00000000 test:

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

Community
  • 1
  • 1
dbrank0
  • 9,026
  • 2
  • 37
  • 55