We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7665dd commit aae9da0Copy full SHA for aae9da0
src/unsafe/asm.md
@@ -488,13 +488,18 @@ To work around this we use `rdi` to store the pointer to the output array, save
488
`push`と`pop`は完全な64ビットの`rbx`レジスタを使って、レジスタ全体を確実に保存しています。
489
32ビットの場合、`push`と`pop`において`ebx`がかわりに利用されるでしょう。
490
491
+<!--
492
This can also be used with a general register class to obtain a scratch register for use inside the asm code:
493
+-->
494
+アセンブリコード内部で利用するスクラッチレジスタを獲得するために、
495
+汎用レジスタクラスとともに使用することもできます:
496
497
```rust
498
# #[cfg(target_arch = "x86_64")] {
499
use std::arch::asm;
500
501
// Multiply x by 6 using shifts and adds
502
+// シフト演算と加算を利用してxに6をかける
503
let mut x: u64 = 4;
504
unsafe {
505
asm!(
0 commit comments