[LLVMdev] Win64 bugs
Peter Shugalev
peter at shugalev.com
Fri Jul 31 01:20:37 PDT 2009
>> Though the most problematic stuff is the lack of 'shadow zone' support
>> in Win64 ABI. Or maybe I haven't figured out how to turn this on. In
>> Win64 any function can treat 32 bytes of stack (RSP+08h..RSP+28h just
>> after the call instruction) as scratch data. VC++ compiler stores
>> arguments passed in registers there. In debug builds this doesn't get
>> optimized away.
>
> Wow, that's really strange... I'm pretty sure that simply isn't implemented.
Another side effect is function with more that four arguments. It won't
work if LLVM/VC++ code is mixed. That's again because of abscence of
32-byte gap between stack top and arguments.
E.g.:
int main () {
printf ( "%d %d %d %d\n", 1, 2, 3, 4 );
return 0;
}
Output:
1 2 3 0
Any ideas on how hard would it be to fix?
--
Best Regards
Peter Shugalev
More information about the llvm-dev
mailing list