Still the case with 4.5.
> arm-none-linux-gnueabi-gcc -Os -S divmod.c > cat divmod.s .cpu arm10tdmi .fpu softvfp .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 2 .eabi_attribute 30, 4 .eabi_attribute 18, 4 .file "divmod.c" .global __aeabi_idivmod .global __aeabi_idiv .text .align 2 .global divmod .type divmod, %function divmod: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 stmfd sp!, {r4, r5, r6, lr} mov r6, r0 mov r5, r1 bl __aeabi_idivmod mov r0, r6 mov r4, r1 mov r1, r5 bl __aeabi_idiv add r0, r4, r0 ldmfd sp!, {r4, r5, r6, pc} .size divmod, .-divmod .ident "GCC: (GNU) 4.5.0 20100325 (experimental)" .section .note.GNU-stack,"",%progbits
Still the case with 4.5.
> arm-none- linux-gnueabi- gcc -Os -S divmod.c stack," ",%progbits
> cat divmod.s
.cpu arm10tdmi
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 4
.eabi_attribute 18, 4
.file "divmod.c"
.global __aeabi_idivmod
.global __aeabi_idiv
.text
.align 2
.global divmod
.type divmod, %function
divmod:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
stmfd sp!, {r4, r5, r6, lr}
mov r6, r0
mov r5, r1
bl __aeabi_idivmod
mov r0, r6
mov r4, r1
mov r1, r5
bl __aeabi_idiv
add r0, r4, r0
ldmfd sp!, {r4, r5, r6, pc}
.size divmod, .-divmod
.ident "GCC: (GNU) 4.5.0 20100325 (experimental)"
.section .note.GNU-