Le mardi 12 juin 2012 17:24:20, Thomas Preud'homme a écrit : [SNIP]
> > Oh dear, it misses a break indeed. I don't remember the exact test I did > but that was a home made assembly file with no code so I couldn't test the > output. I did however checked the result of the relocation and I remember > the relocation gave a different result on gcc and tcc but that is expected > because the symbol doesn't end up at the same adress in the final > executable. So I tried to compare the computation done in both case and > compare with this formula. Obviously I failed somewhere. > > I'll add this break but before committing I'll try to create a full program > which I will be able to execute. Good you noticed. I finally pushed the change. I used the attached assembly code to test the feature. Regards, Thomas Preud'homme
.arch armv4t
.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, 6
.eabi_attribute 18, 4
.file "foo.c"
.text
.align 2
.global foo
.type foo, %function
foo:
baz:
.type baz, %object
.size baz, 4
.word 42
.size foo, .-foo
.data
.align 2
.type bar, %object
.size bar, 4
bar:
.word foo-.
.local bar
.global main
.type main, %function
main:
@ Function supports interworking.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
str fp, [sp, #-4]!
add fp, sp, #0
ldr r3, .L3
ldr r2, [r3, #0]
ldr r3, .L3
add r3, r2, r3
ldr r3, [r3, #0]
cmp r3, #42
movne r3, #1
moveq r3, #0
mov r0, r3
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
.L4:
.align 2
.L3:
.word bar
.size main, .-main
.ident "GCC: (Debian 4.6.3-8) 4.6.3"
.section .note.GNU-stack,"",%progbits
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
