mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
added ARM interpreted mode supported
This commit is contained in:
@ -117,7 +117,11 @@ pushLong(Thread* t, uint64_t v)
|
||||
inline void
|
||||
pushDouble(Thread* t, double v)
|
||||
{
|
||||
pushLong(t, doubleToBits(v));
|
||||
uint64_t w = doubleToBits(v);
|
||||
#ifdef __arm__
|
||||
w = w << 32 | w >> 32;
|
||||
#endif
|
||||
pushLong(t, w);
|
||||
}
|
||||
|
||||
inline object
|
||||
@ -167,10 +171,14 @@ popLong(Thread* t)
|
||||
return (b << 32) | a;
|
||||
}
|
||||
|
||||
inline float
|
||||
inline double
|
||||
popDouble(Thread* t)
|
||||
{
|
||||
return bitsToDouble(popLong(t));
|
||||
uint64_t v = popLong(t);
|
||||
#ifdef __arm__
|
||||
v = v << 32 | v >> 32;
|
||||
#endif
|
||||
return bitsToDouble(v);
|
||||
}
|
||||
|
||||
inline object
|
||||
@ -560,8 +568,17 @@ pushResult(Thread* t, unsigned returnCode, uint64_t result, bool indirect)
|
||||
pushInt(t, result);
|
||||
break;
|
||||
|
||||
case LongField:
|
||||
case DoubleField:
|
||||
#ifdef __arm__
|
||||
result = result << 32 | result >> 32;
|
||||
if (DebugRun) {
|
||||
fprintf(stderr, "result: %"LLD"\n", result);
|
||||
}
|
||||
pushLong(t, result);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case LongField:
|
||||
if (DebugRun) {
|
||||
fprintf(stderr, "result: %"LLD"\n", result);
|
||||
}
|
||||
@ -611,8 +628,17 @@ marshalArguments(Thread* t, uintptr_t* args, unsigned i, unsigned count,
|
||||
args[offset++] = peekInt(t, sp++);
|
||||
break;
|
||||
|
||||
case INT64_TYPE:
|
||||
case DOUBLE_TYPE: {
|
||||
case DOUBLE_TYPE:
|
||||
#ifdef __arm__
|
||||
{
|
||||
uint64_t v = peekLong(t, sp);
|
||||
v = v << 32 | v >> 32;
|
||||
memcpy(args + offset, &v, 8);
|
||||
offset += (8 / BytesPerWord);
|
||||
sp += 2;
|
||||
} break;
|
||||
#endif
|
||||
case INT64_TYPE: {
|
||||
uint64_t v = peekLong(t, sp);
|
||||
memcpy(args + offset, &v, 8);
|
||||
offset += (8 / BytesPerWord);
|
||||
|
Reference in New Issue
Block a user