Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 13 Jul 2012 10:15:25 +0200
From: Szabolcs Nagy <>
Subject: Re: mips port working! & remaining issues

* Rich Felker <> [2012-07-13 01:23:13 -0400]:
> Another major omission shared with arm is that setjmp/longjmp cannot
> preserve floating point registers. This is because I don't yet know
> how to determine at runtime whether hard-float is available, and the
> registers can't be saved unless they can be determined to exist. Help
> solving this problem would also be appreciated.

then use compile time check:
if libc is compiled with -msoft-float then dont save the registers
otherwise save them

i guess gcc has some predefined macro so you can check soft float
at compile time

when gcc compiles with hard float for mips there will be a
a .gnu.attributes section in the object file which is dumped
by readelf as
  Tag_GNU_MIPS_ABI_FP: Hard float (-mdouble-float)
and binutils ld warns when such .o is linked with a soft-float .o

so i think we shouldn't worry about applications using hard float
while the libc is soft float

as for runtime check
on mips you may grep for '^  FPU' in /proc/cpuinfo
on arm '^Features' tells the fpu variant
but i guess these are not very robust;a=blob;f=arch/mips/kernel/proc.c;a=blob;f=arch/arm/kernel/setup.c

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.