[PATCH] D20793: [ELF] - Implemented support for test/binop relaxations from latest ABI.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon May 30 13:39:18 PDT 2016


On 30 May 2016 at 12:42, George Rimar <grimar at accesssoftek.com> wrote:
> grimar created this revision.
> grimar added reviewers: rafael, ruiu.
> grimar added subscribers: llvm-commits, grimar.
>
> Patch implements next relaxation from latest ABI:
>
> "Convert memory operand of test and binop into immediate operand, where binop is one of adc, add, and, cmp, or,
> sbb, sub, xor instructions, when position-independent code is disabled."
>
> It is described in System V Application Binary Interface AMD64 Architecture Processor
> Supplement Draft Version 0.99.8 (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf,
> B.2 "B.2 Optimize GOTPCRELX Relocations").
>
> Note: because of broken llvm-mc atm (https://llvm.org/bugs/show_bug.cgi?id=27939),
> it uses precompiled binary produced by gas as input.

How are you getting instructions that use only 32 bits of a got entry?
I mean, one can write them in assembly, but what is the use case?

Cheers,
Rafael


More information about the llvm-commits mailing list