fix PowerPC floating point argument and return value marshalling

This commit is contained in:
Joel Dice 2012-08-13 11:16:30 -06:00
parent 2abc4e28a5
commit 665c4448bd
2 changed files with 12 additions and 3 deletions

View File

@ -136,9 +136,18 @@ LOCAL(call):
LOCAL(float):
cmpwi r14,FLOAT_TYPE
beq LOCAL(copy)
bne LOCAL(double)
stfs f1,32(r19)
lwz r4,32(r19)
b LOCAL(exit)
LOCAL(double):
cmpwi r14,DOUBLE_TYPE
beq LOCAL(copy)
bne LOCAL(int64)
stfd f1,32(r19)
lwz r3,32(r19)
lwz r4,36(r19)
b LOCAL(exit)
LOCAL(int64):
cmpwi r14,INT64_TYPE
beq LOCAL(exit)
mr r4,r3

View File

@ -196,7 +196,7 @@ dynamicCall(void* function, uintptr_t* arguments, uint8_t* argumentTypes,
} break;
case DOUBLE_TYPE: {
if (fprIndex + (8 / BytesPerWord) <= FprCount) {
if (fprIndex + 1 <= FprCount) {
memcpy(fprTable + fprIndex, arguments + ai, 8);
++ fprIndex;
SKIP(gprIndex, 8 / BytesPerWord);