[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
[arm-gnu] Supporting __softfp compiler directive
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: [arm-gnu] Supporting __softfp compiler directive
- From: Alhad Purnapatre <alhadp@xxxxxxxxxxxx>
- Date: Tue, 26 Jan 2010 17:05:57 -0800
Hello,
We are trying to ensure that headers released for the BREW platform
compile on popular toolchains used by BREW application developers,
including CodeSourcery and RVCT.
In order to have a consistent floating point ABI irrespective of
available floating point hardware support or linking options used, we
tried postfixing __softfp compiler directive to the floating point
function pointers that define BREW interfaces. __softfp ensures that
floating point arguments to functions are passed in integer registers,
not VFP registers. The directive supported by RVCT, but doesn't seem to
work on CodeSourcery.
Here is the RVCT 4.0 documentation that refers to this directive:
<http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205i/CIHGHCAC.html>
I tried using the following using version arm-none-eabi-g++.exe
(Sourcery G++ Lite 2009q3-68) 4.4.1:
alhadp@ALHADP /c/Program Files/CodeSourcery/Sourcery G++ Lite/bin
$ cat test.cpp
typedef struct {
double (*wstrtofloat) (const char *pszNum) __softfp;
}foovtbl;
<snip>
alhadp@ALHADP /c/Program Files/CodeSourcery/Sourcery G++ Lite/bin
$ ./arm-none-eabi-g++.exe -c test.cpp
test.cpp:2: error: expected ';' before '__softfp'
<snip>
The only way we can get the desired linkage is by using this:
#pragma push
#pragma softfp_linkage
<API declaration>
#pragma pop
But that cannot be used inside of macros, which is how most of our
interfaces are defined.
I have a couple of questions
1) Is there a plan to support the VFP ABI?
2) Also, is there a plan for forcing softfp on architectures that
default to VFP?
Please let us know if you need more information. Appreciate your time.
Thanks,
Alhad
|