Changes

Jump to: navigation, search

Inline Assembly Language

5 bytes added, 20:45, 2 October 2019
Assembler Template
=== Assembler Template ===
The assembler template is a piece of assembler code that is will be pre-processed to fill in register assignments. Registers may be referenced as %0, %1, %2 and so forth, indicating the registers mentioned in the output operands and input operands. For example, if there is one output operand and two input operands, you can refer to the register containing the output operand as <code>%0</code> and the input operands as <code>%1</code> and <code>%2</code>.
Because % is used as a prefix for register numbers, a double percent-sign must be used to represent a single percent sign in the code. For example, in x86_64 gas assembler, the rax register is written as <code>%rax</code> -- but in a template, it must be written as <code>%%rax</code>.

Navigation menu