Skip to content

Commit 88f35dd

Browse files
committed
Update wording for reserved registers
1 parent 1b09eb2 commit 88f35dd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/inline-assembly.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,13 @@ Some registers cannot be used for input or output operands:
284284
| x86 | `k0` | This is a constant zero register which can't be modified. |
285285
| x86 | `ip` | This is the program counter, not a real register. |
286286
| AArch64 | `xzr` | This is a constant zero register which can't be modified. |
287-
| AArch64 | `x18` | This is a reserved register on some AArch64 targets. |
287+
| AArch64 | `x18` | This is an OS-reserved register on some AArch64 targets. |
288288
| ARM | `pc` | This is the program counter, not a real register. |
289-
| ARM | `r9` | This is a reserved register on some ARM targets. |
289+
| ARM | `r9` | This is an OS-reserved register on some ARM targets. |
290290
| RISC-V | `x0` | This is a constant zero register which can't be modified. |
291291
| RISC-V | `gp`, `tp` | These registers are reserved and cannot be used as inputs or outputs. |
292292

293-
In some cases LLVM will allocate a "reserved register" for `reg` operands even though this register cannot be explicitly specified.
294-
Assembly code making use of reserved registers should be careful since `reg` operands may alias with those registers.
295-
Reserved registers that can sometimes be allocated are the frame pointer and base pointer in the list above.
293+
The frame pointer and base pointer registers are reserved for internal use by LLVM. While `asm!` statements cannot explicitly specify the use of reserved registers, in some cases LLVM will allocate one of these reserved registers for `reg` operands. Assembly code making use of reserved registers should be careful since `reg` operands may use the same registers.
296294

297295
## Template modifiers
298296

0 commit comments

Comments
 (0)