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
@@ -1134,6 +1134,39 @@ r[asm.rules.x86-x87]
1134
1134
- 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)") _, ...`.
1135
1135
- 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.
1136
1136
1137
+
```rust
1138
+
# #[cfg(target_arch ="x86_64")]
1139
+
pubfnfadd(x:f64, y:f64) ->f64{
1140
+
letmutout=0f64;
1141
+
letmuttop=0u16;
1142
+
// we can do complex stuff with x87 if we clobber the entire x87 stack
- On arm64ec, [call checkers with appropriate thunks](https://learn.microsoft.com/en-us/windows/arm/arm64ec-abi#authoring-arm64ec-in-assembly) are mandatory when calling functions.
1139
1172
@@ -1249,7 +1282,18 @@ The following directives are guaranteed to be supported by the assembler:
0 commit comments