diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-31 18:28:44 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-01-31 18:28:44 +0000 |
| commit | d763c4cc8574c258fcad9b4fca578c0b2ed61469 (patch) | |
| tree | ee96afc57d25fcdf12c663b1200612fa5b525eb6 /llvm/docs/Extensions.rst | |
| parent | 8e3e944cd19de44f7e686c5f65912d52e4ff9d9a (diff) | |
| download | bcm5719-llvm-d763c4cc8574c258fcad9b4fca578c0b2ed61469.tar.gz bcm5719-llvm-d763c4cc8574c258fcad9b4fca578c0b2ed61469.zip | |
MC: Introduce the ABS8 symbol modifier.
@ABS8 can be applied to symbols which appear as immediate operands to
instructions that have a 8-bit immediate form for that operand. It causes
the assembler to use the 8-bit form and an 8-bit relocation (e.g. R_386_8
or R_X86_64_8) for the symbol.
Differential Revision: https://reviews.llvm.org/D28688
llvm-svn: 293667
Diffstat (limited to 'llvm/docs/Extensions.rst')
| -rw-r--r-- | llvm/docs/Extensions.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/docs/Extensions.rst b/llvm/docs/Extensions.rst index 2b12123cdf6..56bb2793059 100644 --- a/llvm/docs/Extensions.rst +++ b/llvm/docs/Extensions.rst @@ -207,6 +207,28 @@ in the assembler to differentiate the sections. Target Specific Behaviour ========================= +X86 +--- + +Relocations +^^^^^^^^^^^ + +``@ABS8`` can be applied to symbols which appear as immediate operands to +instructions that have an 8-bit immediate form for that operand. It causes +the assembler to use the 8-bit form and an 8-bit relocation (e.g. ``R_386_8`` +or ``R_X86_64_8``) for the symbol. + +For example: + +.. code-block:: gas + + cmpq $foo@ABS8, %rdi + +This causes the assembler to select the form of the 64-bit ``cmpq`` instruction +that takes an 8-bit immediate operand that is sign extended to 64 bits, as +opposed to ``cmpq $foo, %rdi`` which takes a 32-bit immediate operand. This +is also not the same as ``cmpb $foo, %dil``, which is an 8-bit comparison. + Windows on ARM -------------- |

