Page MenuHomePhabricator

llvm-mc. Enables eip-relative addressing.

Authored by jpp on Jan 26 2016, 7:02 AM.



Enables eip-based addressing, e.g.,

lea constant(%eip), %rax
lea constant(%eip), %eax

in llvm-mc, which is used in x32. EIP-base addressing is also valid in x86_64,
it is left enabled for that architecture as well.

Diff Detail


Event Timeline

jpp updated this revision to Diff 45990.Jan 26 2016, 7:02 AM
jpp retitled this revision from to llvm-mc. Enables eip-relative addressing..
jpp updated this object.
jpp added a reviewer: dschuff.
dschuff edited edge metadata.Jan 26 2016, 9:53 AM
dschuff added a subscriber: llvm-commits.


Could you add a little bit more detail to the commit description (e.g. this is used for x32, it still requires x86-64 codegen, etc)

jpp updated this object.Jan 26 2016, 10:05 AM
jpp edited edge metadata.
dschuff accepted this revision.Jan 26 2016, 11:02 AM
dschuff edited edge metadata.


This revision is now accepted and ready to land.Jan 26 2016, 11:02 AM
jpp updated this revision to Diff 46118.Jan 27 2016, 3:51 AM
jpp edited edge metadata.

Adding EIP to GR32 introduces regressions in other llvm components. This patch reverts that change, and then it adds a check to Is32BitMemOperand.

This patch was tested with

ninja check-llvm.

Let me know if any other tests are needed.

Looks better, thanks. I'll leave it up for a bit more in case there are more comments, and land it soon.

This revision was automatically updated to reflect the committed changes.