mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
gcc define __ARM_PCS_VFP for -mfloat-abi=hard, use it to detect armhf builds.
Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
This commit is contained in:
parent
1d4c9d32fb
commit
2a15201b18
@ -57,7 +57,7 @@ LOCAL(loop):
|
||||
// setup argument registers if necessary
|
||||
tst r6, r6
|
||||
ldmneia r6, {r0-r3}
|
||||
#if defined(__VFP_FP__) && (! defined(__SOFTFP__)) && (! defined(__QNX__))
|
||||
#if defined(__ARM_PCS_VFP)
|
||||
// and VFP registers
|
||||
vldmia r7, {d0-d7}
|
||||
#endif
|
||||
@ -70,7 +70,7 @@ LOCAL(loop):
|
||||
#endif
|
||||
add sp, sp, r5 // deallocate stack
|
||||
|
||||
#if defined(__VFP_FP__) && (! defined(__SOFTFP__)) && (! defined(__QNX__))
|
||||
#if defined(__ARM_PCS_VFP)
|
||||
cmp r8,#FLOAT_TYPE
|
||||
bne LOCAL(double)
|
||||
fmrs r0,s0
|
||||
|
12
src/arm.cpp
12
src/arm.cpp
@ -245,7 +245,17 @@ inline int bpl(int offset) { return SETCOND(b(offset), PL); }
|
||||
inline int fmstat() { return fmrx(15, FPSCR); }
|
||||
// HARDWARE FLAGS
|
||||
bool vfpSupported() {
|
||||
return true; // TODO
|
||||
// TODO: Use at runtime detection
|
||||
#if defined(__ARM_PCS_VFP)
|
||||
// armhf
|
||||
return true;
|
||||
#else
|
||||
// armel
|
||||
// TODO: allow VFP use for -mfloat-abi=softfp armel builds.
|
||||
// GCC -mfloat-abi=softfp flag allows use of VFP while remaining compatible
|
||||
// with soft-float code.
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ dynamicCall(void* function, uintptr_t* arguments, uint8_t* argumentTypes,
|
||||
for (unsigned ati = 0; ati < argumentCount; ++ ati) {
|
||||
switch (argumentTypes[ati]) {
|
||||
case DOUBLE_TYPE:
|
||||
#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) && !defined(__QNX__)
|
||||
#if defined(__ARM_PCS_VFP)
|
||||
{
|
||||
if (vfpIndex + Alignment <= VfpCount) {
|
||||
if (vfpIndex % Alignment) {
|
||||
|
Loading…
Reference in New Issue
Block a user