This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

-msoft-float and assembler...


If I try to compile the code below with `gcc -S -msoft-float sf.S`, it seems the
define __SOFT_FP__  is not passed to the assembler.  Should it be?  I ran into
this when building a multilibbed version of libgcj.  There is some assembler in
libffi for calling foreign functions that uses floating point instructions.  I
was trying to conditionally compile that file.

file: sf.S

@ Generated by gcc 2.95.2 20000212 (release) [Rebel.com] for ARM/elf
        .file   "sf.c"
gcc2_compiled.:
.text
        .align  2
        .global main
        .type    main,function
main:
        @ args = 0, pretend = 0, frame = 8
        @ frame_needed = 1, current_function_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {fp, ip, lr, pc}
        sub     fp, ip, #4
        sub     sp, sp, #8
        str     r0, [fp, #-16]
        str     r1, [fp, #-20]
#ifdef __SOFT_FP__
        @ compiled with -msoft-float
#else
        @ compiled with hard float
#endif
.L2:
        ldmea   fp, {fp, sp, pc}
.Lfe1:
        .size    main,.Lfe1-main
        .ident  "GCC: (GNU) 2.95.2 20000212 (release) [Rebel.com]"

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]