Trying to reason about emitted loop code
Hello, I'm currently having a hard time trying to explain following emitted code:
[ASM]
39 0002 094D ldr r5, .L6
40 .L2:
47 .loc 2 410 0 discriminator 1
48 0004 2B69 ldr r3, [r5, #16]
49 0006 084C ldr r4, .L6
50 .LBE2375:
51 .LBE2374:
52 .LBE2373:
53 .LBE2372:
75:..
54 .loc 1 75 0 discriminator 1
55 0008 DB07 lsls r3, r3, #31
56 000a FBD4 bmi .L2
...
108 .L6:
109 0028 00000000 .word __eth__
[/ASM]
Can you explain what that load to r4 is for? I tried to reason about loop alignment or something along the lines, but is a pc-relative memory load not a bit intrusive for that?
Note I'm not saying I'm convinced it is bad code or something, I just don't understand it...
This code was emitted from 4.9q4 compiler, but 4.8q3 does the same thing.
Kind regards
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Michael Steinberg
- Solved:
- Last query:
- Last reply: