In message <[EMAIL PROTECTED]>, 
"Hanske;Stefan" writes:
>The following just won't work:
>
>       long long foo(long long test) {return test;}
>
>       int main() {
>               long long test = 0x1010101010101010;
>               if (foo(test) == test) printf("I'm happy");
>       }

Pardon?  It works for me.  Here's the generated assembler.

@ Generated by gcc 2.96 19991025 (experimental) for ARM/elf
        .file   "longlong.c"
gcc2_compiled.:
.text
        .align  2
        .global foo
        .type    foo,function
foo:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, current_function_anonymous_args = 0
        mov     pc, lr
.Lfe1:
        .size    foo,.Lfe1-foo
.section        .rodata
        .align  2
.LC0:
        .ascii  "I'm happy\000"
.text
        .align  2
        .global main
        .type    main,function
main:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, current_function_anonymous_args = 0
        stmfd   sp!, {r4, r5, lr}
        adr     r4, .L5
        ldmia   r4, {r4-r5}
        mov     r1, r5
        mov     r0, r4
        bl      foo
        cmp     r0, r4
        ldmnefd sp!, {r4, r5, pc}
        cmp     r1, r5
        ldr     r0, .L5+8
        ldmnefd sp!, {r4, r5, pc}
        ldmfd   sp!, {r4, r5, lr}
        b       printf
.L6:
        .align  2
.L5:
        .word   269488144
        .word   269488144
        .word   .LC0
.Lfe2:
        .size    main,.Lfe2-main
        .ident  "GCC: (GNU) 2.96 19991025 (experimental)"

>Another thing that just won't work is the use of llseek() in defrag.

This should be fine as well.  Are you sure you had a prototype in scope?

p.



unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++        Please use [EMAIL PROTECTED] for           ++
++                        kernel-related discussions.                      ++

Reply via email to