[PATCH] D54016: [X86] don't allow X86_64 PIC mode addresses to be used as immediates

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 15:44:04 PST 2018


rnk added a comment.

In D54016#1315606 <https://reviews.llvm.org/D54016#1315606>, @rapidsna wrote:

> @rnk Thanks for looking into this.
>
> I'm not sure I understand:
>
> The change I made is inside the function `void X86TargetLowering::LowerAsmOperandForConstraint(`, and under `case 'i': {` which specifically handles operands of the inline assembly constraint `i`. Inside this routine DOES have the PIC checking routine in order not to emit immediates in the case of PIC modes. There are already checks for other PIC styles but a check for RIPRel is missing. So I still believe this is the right place to fix this problem.


I see, that sounds reasonable then. Sorry, the diff is uploaded without -U9999 context, so I assumed it was in one of a more general routine.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54016/new/

https://reviews.llvm.org/D54016





More information about the llvm-commits mailing list