include return address size in frameSize passed to vmInvoke; fix printf warnings

This commit is contained in:
Joel Dice 2009-05-28 19:50:44 -06:00
parent 2478d4fc7f
commit 14613193fa
2 changed files with 8 additions and 7 deletions

View File

@ -288,7 +288,7 @@ bitsToFloat(uint32_t bits)
return f; return f;
} }
inline intptr_t inline int
difference(void* a, void* b) difference(void* a, void* b)
{ {
return reinterpret_cast<intptr_t>(a) - reinterpret_cast<intptr_t>(b); return reinterpret_cast<intptr_t>(a) - reinterpret_cast<intptr_t>(b);

View File

@ -5412,7 +5412,8 @@ jumpAndInvoke(MyThread* t, object method, void* base, void* stack, ...)
stack, stack,
argumentCount * BytesPerWord, argumentCount * BytesPerWord,
arguments, arguments,
t->arch->alignFrameSize(t->arch->argumentFootprint(argumentCount)) (t->arch->alignFrameSize(t->arch->argumentFootprint(argumentCount))
+ t->arch->frameReturnAddressSize())
* BytesPerWord); * BytesPerWord);
} }
@ -5922,11 +5923,11 @@ class MyProcessor: public Processor {
t->init(); t->init();
if (false) { if (false) {
fprintf(stderr, "%"LD"\n", difference(&(t->continuation), t)); fprintf(stderr, "%d\n", difference(&(t->continuation), t));
fprintf(stderr, "%"LD"\n", difference(&(t->exception), t)); fprintf(stderr, "%d\n", difference(&(t->exception), t));
fprintf(stderr, "%"LD"\n", difference(&(t->exceptionStackAdjustment), t)); fprintf(stderr, "%d\n", difference(&(t->exceptionStackAdjustment), t));
fprintf(stderr, "%"LD"\n", difference(&(t->exceptionOffset), t)); fprintf(stderr, "%d\n", difference(&(t->exceptionOffset), t));
fprintf(stderr, "%"LD"\n", difference(&(t->exceptionHandler), t)); fprintf(stderr, "%d\n", difference(&(t->exceptionHandler), t));
exit(0); exit(0);
} }