diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-02-09 21:47:07 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-02-09 21:47:07 +0000 |
commit | e67ed4c039cb013fabbb7dccd2a0239f1d2fc3dc (patch) | |
tree | 2b09094abd3f19f6500d96ec7098e30ba40d0942 /llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | |
parent | 0dc2ac54e129cba9b672f5ed5e932bc16601e9eb (diff) | |
download | bcm5719-llvm-e67ed4c039cb013fabbb7dccd2a0239f1d2fc3dc.tar.gz bcm5719-llvm-e67ed4c039cb013fabbb7dccd2a0239f1d2fc3dc.zip |
[X86][MC] Fix assembling rip-relative addressing + immediate displacements
In the rare case where the input contains rip-relative addressing with
immediate displacements, *and* the instruction ends with an immediate,
we encode the instruction in the wrong way:
movl $12345678, 0x400(%rdi) // all good, no rip-relative addr
movl %eax, 0x400(%rip) // all good, no immediate at the end of the instruction
movl $12345678, 0x400(%rip) // fails, encodes address as 0x3fc(%rip)
Offset is a label:
movl $12345678, foo(%rip)
we want to account for the size of the immediate (in this case,
$12345678, 4 bytes).
Offset is an immediate:
movl $12345678, 0x400(%rip)
we should not account for the size of the immediate, assuming the
immediate offset is what the user wanted.
Differential Revision: https://reviews.llvm.org/D43050
llvm-svn: 324772
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp')
0 files changed, 0 insertions, 0 deletions