Skip to content

Commit d3306b1

Browse files
committed
Inline assembly: Add kreg0 register class
This was added by rust-lang/rust#95740.
1 parent abd11a1 commit d3306b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/inline-assembly.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ Here is the list of currently supported register classes:
159159
| x86 | `ymm_reg` | `ymm[0-7]` (x86) `ymm[0-15]` (x86-64) | `x` |
160160
| x86 | `zmm_reg` | `zmm[0-7]` (x86) `zmm[0-31]` (x86-64) | `v` |
161161
| x86 | `kreg` | `k[1-7]` | `Yk` |
162+
| x86 | `kreg0` | `k0` | Only clobbers |
162163
| x86 | `x87_reg` | `st([0-7])` | Only clobbers |
163164
| x86 | `mmx_reg` | `mm[0-7]` | Only clobbers |
164165
| AArch64 | `reg` | `x[0-30]` | `r` |
@@ -285,7 +286,6 @@ Some registers cannot be used for input or output operands:
285286
| All | `bp` (x86), `x29` (AArch64), `x8` (RISC-V) | The frame pointer cannot be used as an input or output. |
286287
| ARM | `r7` or `r11` | On ARM the frame pointer can be either `r7` or `r11` depending on the target. The frame pointer cannot be used as an input or output. |
287288
| All | `si` (x86-32), `bx` (x86-64), `r6` (ARM), `x19` (AArch64), `x9` (RISC-V) | This is used internally by LLVM as a "base pointer" for functions with complex stack frames. |
288-
| x86 | `k0` | This is a constant zero register which can't be modified. |
289289
| x86 | `ip` | This is the program counter, not a real register. |
290290
| AArch64 | `xzr` | This is a constant zero register which can't be modified. |
291291
| AArch64 | `x18` | This is an OS-reserved register on some AArch64 targets. |
@@ -366,9 +366,9 @@ The following ABIs can be used with `clobber_abi`:
366366

367367
| Architecture | ABI name | Clobbered registers |
368368
| ------------ | -------- | ------------------- |
369-
| x86-32 | `"C"`, `"system"`, `"efiapi"`, `"cdecl"`, `"stdcall"`, `"fastcall"` | `ax`, `cx`, `dx`, `xmm[0-7]`, `mm[0-7]`, `k[1-7]`, `st([0-7])` |
370-
| x86-64 | `"C"`, `"system"` (on Windows), `"efiapi"`, `"win64"` | `ax`, `cx`, `dx`, `r[8-11]`, `xmm[0-31]`, `mm[0-7]`, `k[1-7]`, `st([0-7])` |
371-
| x86-64 | `"C"`, `"system"` (on non-Windows), `"sysv64"` | `ax`, `cx`, `dx`, `si`, `di`, `r[8-11]`, `xmm[0-31]`, `mm[0-7]`, `k[1-7]`, `st([0-7])` |
369+
| x86-32 | `"C"`, `"system"`, `"efiapi"`, `"cdecl"`, `"stdcall"`, `"fastcall"` | `ax`, `cx`, `dx`, `xmm[0-7]`, `mm[0-7]`, `k[0-7]`, `st([0-7])` |
370+
| x86-64 | `"C"`, `"system"` (on Windows), `"efiapi"`, `"win64"` | `ax`, `cx`, `dx`, `r[8-11]`, `xmm[0-31]`, `mm[0-7]`, `k[0-7]`, `st([0-7])` |
371+
| x86-64 | `"C"`, `"system"` (on non-Windows), `"sysv64"` | `ax`, `cx`, `dx`, `si`, `di`, `r[8-11]`, `xmm[0-31]`, `mm[0-7]`, `k[0-7]`, `st([0-7])` |
372372
| AArch64 | `"C"`, `"system"`, `"efiapi"` | `x[0-17]`, `x18`\*, `x30`, `v[0-31]`, `p[0-15]`, `ffr` |
373373
| ARM | `"C"`, `"system"`, `"efiapi"`, `"aapcs"` | `r[0-3]`, `r12`, `r14`, `s[0-15]`, `d[0-7]`, `d[16-31]` |
374374
| RISC-V | `"C"`, `"system"`, `"efiapi"` | `x1`, `x[5-7]`, `x[10-17]`, `x[28-31]`, `f[0-7]`, `f[10-17]`, `f[28-31]`, `v[0-31]` |

0 commit comments

Comments
 (0)