Yeah, but I was referring to how it saved and restored r3 or r4 on the stack, which I assume was for alignment purposes. After changing the code to return zero, gcc 4.3.3 also aligns the stack, albeit in a less-efficient way:Laurent said:It's because your code uses an undefined behaviour since it doesn't return a value for main.
Code:
main:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
str lr, [sp, #-4]!
ldr r0, .L3
sub sp, sp, #4
bl puts
mov r0, #0
add sp, sp, #4
ldmfd sp!, {pc}
It seems that lacking movt isn't the only problem with gcc 4.3.3, which is the compiler used in the current version of Angstrom,Laurent said:So if you want movw/movt, you should use CSL compiler or perhaps gcc 4.4.n.
Last edited by a moderator: