Thanks for reporting such an interesting issue. Basically the code are doing below things:
mov r3, #imme1
str r0, [r3]
Consider case that the #imme1 is too big to be encoded in 'mov' instruction, but value like '#imme1 - offset' can be encoded. The clever way will be:
mov r3, #imme1-offset
str r0, [r3, offset]
But looks current 4.9 and trunk are not so clever, the less efficient code will be generated:
Thanks for reporting such an interesting issue. Basically the code are doing below things:
mov r3, #imme1
str r0, [r3]
Consider case that the #imme1 is too big to be encoded in 'mov' instruction, but value like '#imme1 - offset' can be encoded. The clever way will be:
mov r3, #imme1-offset
str r0, [r3, offset]
But looks current 4.9 and trunk are not so clever, the less efficient code will be generated:
ldr r3, .L1
str r0, [r3]
.L1:
.word #imme1
Joey, does this look familiar to you?