From 2554673dda381457b87450fad5c9156415642b7a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Wed, 25 Feb 2009 18:11:41 -0700 Subject: [PATCH] call c->arch->plan in CallEvent ctor to ensure the address operand is placed into the proper operand type for the call instruction --- src/compiler.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 3804f01823..61cfa0097d 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -2251,8 +2251,19 @@ class CallEvent: public Event { fprintf(stderr, "address read %p\n", address); } - addRead(c, this, address, read - (c, SiteMask(~0, registerMask, AnyFrameIndex))); + { bool thunk; + uint8_t typeMask; + uint64_t planRegisterMask; + c->arch->plan + ((flags & Compiler::Aligned) ? AlignedCall : Call, BytesPerWord, + &typeMask, &planRegisterMask, &thunk); + + assert(c, thunk == 0); + + addRead(c, this, address, read + (c, SiteMask + (typeMask, registerMask & planRegisterMask, AnyFrameIndex))); + } int footprint = stackArgumentFootprint; for (Stack* s = stackBefore; s; s = s->next) {