Skip to content

Commit e7dabd3

Browse files
committed
remove wording about inserting shims
1 parent 50b25da commit e7dabd3

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

text/0000-simd-ffi.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,14 @@ fn main() {
140140
```
141141

142142
independently of the `-C target-feature`s used globally to compile the whole
143-
binary.
144-
145-
Note here that:
143+
binary. Note that:
146144

147145
* `extern "C" foo` is compiled with `AVX` enabled, so `foo` takes an `__m256`
148146
like the C ABI expects
149147
* the call to `foo` is guarded with an `is_x86_feature_detected`, that is, `foo`
150148
will only be called if `AVX` is available at run-time
151-
* if the Rust binary is compiled without `AVX`, Rust will insert shims in the
152-
call to `foo` to pass it as a 256-bit register. Rust already does this, and
153-
`#[target_feature]` is what allows it to do it. Without the
154-
`#[target_feature]` annotation, Rust does not know that C expects this.
149+
* if the Rust calling convention differs from the calling convention of the
150+
`extern` function, Rust has to adapt these.
155151

156152
# Guide-level and reference-level explanation
157153
[reference-level-explanation]: #reference-level-explanation

0 commit comments

Comments
 (0)