File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -140,18 +140,14 @@ fn main() {
140
140
```
141
141
142
142
independently of the ` -C target-feature ` s used globally to compile the whole
143
- binary.
144
-
145
- Note here that:
143
+ binary. Note that:
146
144
147
145
* ` extern "C" foo ` is compiled with ` AVX ` enabled, so ` foo ` takes an ` __m256 `
148
146
like the C ABI expects
149
147
* the call to ` foo ` is guarded with an ` is_x86_feature_detected ` , that is, ` foo `
150
148
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.
155
151
156
152
# Guide-level and reference-level explanation
157
153
[ reference-level-explanation ] : #reference-level-explanation
You can’t perform that action at this time.
0 commit comments