8 int c = 17;
9 int d = 12;
10
11 int main (void)
- 12 {
13 volatile int a = 1;
- 14 volatile int b = 2;
15
- 16 c = a;
- 17 d = b;
18
- 19
20
22
- 23 }
24
- 25 int addition(int
- 26 a = b + c;
- 28
Ohne Op
asm op3
- 0x8218 <main>:
- 0x821c <main+4>: add r11, sp, #4 ; 0x4
- 0x8220 <main+8>:
0x821c <main+4>: mov r3, #1 ; 0x1
- 0x8220 <main+8>: str r3, [sp, #4]
- 0x8224 <main+12>: mov r3,
- 0x8228 <main+16>: str r3,
- 0x822c <main+20>:
- 0x8230 <main+24>:
- 0x8234 <main+28>: ldr
- 0x8238 <main+32>: ldr
- 0x823c <main+36>:
- 0x8240 <main+40>:
- 0x8244 <main+44>:
- 0x8248 <main+48>:
- 0x824c <main+52>:
- 0x8250 <main+56>:
- 0x8254 <main+60>: ldr r3, [pc, #48] ; 0x828c <main+116>
- 0x8258 <main+64>: ldr r3, [r3]
- 0x825c <main+68>: mov r0, r2
- 0x8260 <main+72>: mov r1, r3
- 0x8264 <main+76>: ldr r2, [r11, #-12]
- 0x8268 <main+80>: bl 0x8290 <addition>
- 0x826c <main+84>: mov r2, r0
- 0x8270 <main+88>: ldr r3, [pc, #20] ; 0x828c <main+116>
- 0x8274 <main+92>: str r2, [r3]
- 0x8278 <main+96>: mov r3, #0 ; 0x0
- 0x827c <main+100>: mov r0, r3
- 0x8280 <main+104>: sub sp, r11, #4 ; 0x4
- 0x8284 <main+108>: pop {r11, pc}
- 0x8288 <main+112>: andeq r2, r1, r0, ror r3
- 0x828c <main+116>: andeq r2, r1, r4, ror r3
Op1:
- 0x8220 <main>: push {r4, lr}
0x8224 <main+4>: ldr r4, [pc, #28] ; 0x8248 <main+40>
- 0x8228 <main+8>: mov r2, #1 ; 0x1
- 0x822c <main+12>: str r2, [r4]
- 0x8230 <main+16>: mov r0, r2
- 0x8234 <main+20>: mov r1, #2 ; 0x2
- 0x8238 <main+24>: bl 0x8218 <addition>
- 0x823c <main+28>: str r0, [r4, #4]
- 0x8240 <main+32>: mov r0, #0 ; 0x0
- 0x8244 <main+36>: pop {r4, pc}
- 0x8248 <main+40>: andeq r2, r1, r8, ror #5
op2:
- 0x8218 <main>: ldr r3, [pc, #20] ; 0x8234 <main+28>
0x821c <main+4>: mov r2, #3 ; 0x3
- 0x8220 <main+8>: str r2, [r3, #4]
- 0x8224 <main+12>: mov r2, #1 ; 0x1
- 0x8228 <main+16>: str r2, [r3]
- 0x822c <main+20>: mov r0, #0 ; 0x0
- 0x8230 <main+24>: bx lr
- 0x8234 <main+28>: ldrdeq r2, [r1], -r4
Anderer Code mit op3:
- 0x8218 <main>: ldr r3, [pc, #16] ; 0x8230 <main+24>
0x821c <main+4>: mov r0, #3 ; 0x3
- 0x8220 <main+8>: mov r2, #1 ; 0x1
- 0x8224 <main+12>: str r2, [r3]
- 0x8228 <main+16>: str r0, [r3, #4]
- 0x822c <main+20>: bx lr
- 0x8230 <main+24>: ldrdeq