cortex-m0 mov instruction performed as adds
I am doing cortex-m0 assembly optimizations. Verified the problem using
arm-none-eabi-gcc (GCC) 4.7.2
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.3 20121207 (release) [ARM/embedded-
And the following parameters:
arm-none-eabi-as -mcpu=cortex-m0 -mthumb -g ...
I want to move some registers using:
mov r0, r8
mov r1, r9
mov r7, r5
which is translated to (extracted from object dump)
396: 4640 mov r0, r8
398: 4649 mov r1, r9
3a4: 1c2f adds r7, r5, #0 <-- problem
My problem is that mov does not update the carry flag, while adds does. This is a problem in my optimizations I perform.
According to the datasheets the mov instruction should be able to move from lower to lower register.
Can anybody confirm my problem?
Is this really a problem?
Is there a work-around? e.g. that I manually enter the opcode?
Thanks,
Erich
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Joey Ye
- Solved:
- Last query:
- Last reply: