HomePhabricator

[WinEH] Setup RBP correctly in Win64 funclet prologues

Description

[WinEH] Setup RBP correctly in Win64 funclet prologues

Previously local variable captures just didn't work in 64-bit. Now we
can access local variables more or less correctly.

Details

Auditors
seurer
Committed
rnkSep 29 2015, 4:32 PM
Parents
rL248856: ELF2: Do not use host pointer size to calculate x86_64 relocation addresses.
Branches
Unknown
Tags
Unknown

Event Timeline

seurer raised a concern with this commit.Sep 30 2015, 11:25 AM
seurer added a subscriber: seurer.

This change generates a warning during a normal build and causes the sanitizer buildbots (which use -Werror which they build) to fail.

/home/buildbots/sanitizerslave1/sanitizer-ppc64-1/build/llvm/lib/Target/X86/X86FrameLowering.cpp:733:41: error: comparison of integers of different signs: 'int' and 'uint64_t' (aka 'unsigned long') [-Werror,-Wsign-compare]

assert(MFI->getOffsetAdjustment() == -NumBytes &&
       ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~

/usr/include/assert.h:86:5: note: expanded from macro 'assert'

((expr)                                                               \
  ^~~~

1 error generated.
lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/build.make:169: recipe for target 'lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86FrameLowering.cpp.o' failed
make[3]: * [lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/X86FrameLowering.cpp.o] Error 1
CMakeFiles/Makefile2:8912: recipe for target 'lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/all' failed
make[2]:
* [lib/Target/X86/CMakeFiles/LLVMX86CodeGen.dir/all] Error 2
CMakeFiles/Makefile2:16842: recipe for target 'tools/clang/runtime/CMakeFiles/check-asan-dynamic.dir/rule' failed
make[1]: * [tools/clang/runtime/CMakeFiles/check-asan-dynamic.dir/rule] Error 2
Makefile:4643: recipe for target 'check-asan-dynamic' failed
make:
* [check-asan-dynamic] Error 2

rnk added a subscriber: rnk.Sep 30 2015, 4:22 PM

David Blaikie fixed in r248942.

seurer resigned from this audit.Oct 9 2015, 2:29 PM