[PATCH] Use 32-bit ebp for NaCl64 in a limited case: llvm.frameaddress.

Jan Voung jvoung at chromium.org
Wed Dec 3 15:35:29 PST 2014


Hi dschuff, nadav,

Follow up to [x32] "Use ebp/esp as frame and stack pointer":
http://reviews.llvm.org/D4617

In that earlier patch, NaCl64 was made to always use rbp.
That's needed for most cases because rbp should hold a full
64-bit address within the NaCl sandbox so that load/stores
off of rbp don't require sandbox adjustment (zeroing the top
32-bits, then filling those by adding r15).

However, llvm.frameaddress returns a pointer and pointers
are 32-bit for NaCl64. In this case, use ebp instead, which
will make the register copy type check. A similar mechanism
may be needed for llvm.eh.return, but is not added in this change.

http://reviews.llvm.org/D6514

Files:
  lib/Target/X86/X86FastISel.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86RegisterInfo.cpp
  lib/Target/X86/X86RegisterInfo.h
  test/CodeGen/X86/frameaddr.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6514.16893.patch
Type: text/x-patch
Size: 4404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141203/72cf6898/attachment.bin>


More information about the llvm-commits mailing list