Fabian Cenedese writes: > At 14:33 07.12.2006 +0100, Fabian Cenedese wrote: > >Hi > > > >Is there a flag to tell gcc NOT to use float assembler commands > >for 64bit data? We have problems that the generated code contains > >float commands while the target (partially) has no float support. > > > >To make it clear: This is not about the soft-float library which would > >emulate float commands. We don't want gcc to even generate > >those unless it really is about float operations. > > > >Here's one example (for PPC603), but there also are others: > > > >inline uint64 GetSystemTicks() > >{ > > union { > > uint64 s; > > struct { > > uint32 high; > > uint32 low; > > } m; > > } result; > > > > uint32 tmp=0; > > asm volatile ( > > "mftbu %0" "\n\t" > > "mftb %1" "\n\t" > > "mftbu %2" "\n\t" > > "cmpw %3,%4" "\n\t" > > "beq 0f" "\n\t" > > "mftbu %0" "\n\t" > > "mftb %1" "\n\t" > > "0:" > > : "=r" (result.m.high), "=r" (result.m.low), "=r" (tmp) > > : "0" (result.m.high), "2" (tmp)); > > > > return result.s; > >} > > > >...(snip)... > > mr 0,10 # tmp120, > > stw 0,8(31) # result.m.high, tmp120 > > stw 9,12(31) # result.m.low, tmp121 > > stw 11,16(31) # tmp, tmp122 > >-> lfd 0,8(31) # result.s, result.s > >-> stfd 0,24(31) #, result.s > > lwz 9,24(31) #, <result> > > lwz 10,28(31) #, <result> > > mr 3,9 # <result>, <result> > > mr 4,10 # <result>, <result> > > lwz 11,0(1) #, > > lwz 31,-4(11) #, > > mr 1,11 #, > > blr # > > > >The float commands are simply used for moving 64 bit of data around. > >That may be faster than 2x32 but not working here. I'm interested in > >workarounds for various gcc versions (2.95, 3.4, 4.x). > > Doesn't anybody know a way around this? Or has the same problem? I guess we're having difficulty understanding why -msoft-float is not appropriate for you. It seems to me obviously the right thing to do with a target (partially) without float support. Andrew.