You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/inline-assembly.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1109,6 +1109,39 @@ r[asm.rules.x86-x87]
1109
1109
- On x86, the x87 floating-point register stack must remain unchanged unless all of the `st([0-7])` registers have been marked as clobbered with `out("st(0)") _, out("st(1)") _, ...`.
1110
1110
- If all x87 registers are clobbered then the x87 register stack is guaranteed to be empty upon entering an `asm` block. Assembly code must ensure that the x87 register stack is also empty when exiting the asm block.
1111
1111
1112
+
```rust
1113
+
# #[cfg(target_arch ="x86_64")]
1114
+
pubfnfadd(x:f64, y:f64) ->f64{
1115
+
letmutout=0f64;
1116
+
letmuttop=0u16;
1117
+
// we can do complex stuff with x87 if we clobber the entire x87 stack
0 commit comments