about summary refs log tree commit diff
path: root/src/test/assembly
AgeCommit message (Collapse)AuthorLines
2021-03-25Mark inline asm tests as requiring LLVM 10.0.1Amanieu d'Antras-11/+11
2021-03-16Adjust `-Ctarget-cpu=native` handling in cg_llvmSimonas Kazlauskas-0/+41
When cg_llvm encounters the `-Ctarget-cpu=native` it computes an explciit set of features that applies to the target in order to correctly compile code for the host CPU (because e.g. `skylake` alone is not sufficient to tell if some of the instructions are available or not). However there were a couple of issues with how we did this. Firstly, the order in which features were overriden wasn't quite right – conceptually you'd expect `-Ctarget-cpu=native` option to override the features that are implicitly set by the target definition. However due to how other `-Ctarget-cpu` values are handled we must adopt the following order of priority: * Features from -Ctarget-cpu=*; are overriden by * Features implied by --target; are overriden by * Features from -Ctarget-feature; are overriden by * function specific features. Another problem was in that the function level `target-features` attribute would overwrite the entire set of the globally enabled features, rather than just the features the `#[target_feature(enable/disable)]` specified. With something like `-Ctarget-cpu=native` we'd end up in a situation wherein a function without `#[target_feature(enable)]` annotation would have a broader set of features compared to a function with one such attribute. This turned out to be a cause of heavy run-time regressions in some code using these function-level attributes in conjunction with `-Ctarget-cpu=native`, for example. With this PR rustc is more careful about specifying the entire set of features for functions that use `#[target_feature(enable/disable)]` or `#[instruction_set]` attributes. Sadly testing the original reproducer for this behaviour is quite impossible – we cannot rely on `-Ctarget-cpu=native` to be anything in particular on developer or CI machines.
2021-02-28Support LLVM 12 in rustcNikita Popov-14/+15
2021-02-1432-bit ARM: Emit `lr` instead of `r14` when specified as an `asm!` output ↵Johnathan Van Why-0/+9
register. On 32-bit ARM platforms, the register `r14` has the alias `lr`. When used as an output register in `asm!`, rustc canonicalizes the name to `r14`. LLVM only knows the register by the name `lr`, and rejects it. This changes rustc's LLVM code generation to output `lr` instead.
2021-01-14Use probe-stack=inline-asm in LLVM 11+Erik Desjardins-0/+42
2020-12-01Add wasm32 support to inline asmGus Caplan-0/+150
2020-10-04Add asm! support for mips64Lzu Tao-64/+90
2020-10-04mips32: Add f64 hard-float supportLzu Tao-0/+24
co-authored-by: Amanieu <amanieu@gmail.com>
2020-09-30Remove useless stringifyLzu Tao-4/+0
2020-09-28Auto merge of #77008 - fortanix:raoul/lvi-tests, r=Mark-Simulacrumbors-0/+70
LVI hardening tests Mitigating the speculative execution LVI attack against SGX enclaves requires compiler changes (i.e., adding lfences). This pull requests adds various tests to check if this happens correctly.
2020-09-27Add MIPS asm! supportLzu Tao-0/+191
This patch also: * Add soft-float supports: only f32 * zero-extend i8/i16 to i32 because MIPS only supports register-length arithmetic. * Update table in asm! chapter in unstable book.
2020-09-25cleaning up codeRaoul Strackx-14/+0
2020-09-25Building libunwind with new CMakeLists.Raoul Strackx-4/+0
The old CMakeLists file of libunwind used the C compiler to compile assembly files. This caused such code not to be hardened.
2020-09-25skeleton check module level assemblyRaoul Strackx-0/+16
2020-09-25rust inline assembly lvi hardening testRaoul Strackx-0/+41
2020-09-22generic load hardening testRaoul Strackx-0/+18
2020-09-22generic ret hardening testRaoul Strackx-0/+13
2020-08-28Fix testAmanieu d'Antras-10/+11
2020-08-26Fix a typo in #75781Amanieu d'Antras-0/+5
2020-08-22Expand RISCV pseudo-instructions to match LLVM 11Josh Stone-15/+16
2020-08-21Add regression testAmanieu d'Antras-0/+5
2020-08-03Work around LLVM issues with explicit register in inline asmAmanieu d'Antras-62/+833
Fixes #74658
2020-08-02compiletest: Support ignoring tests requiring missing LLVM componentsVadim Petrochenkov-0/+8
2020-06-16Add initial asm!() support for hexagonBrian Cain-0/+130
GPRs only
2020-05-24Added comment about static variablesMichal Sudwoj-0/+1
2020-05-24Fixed testsMichal Sudwoj-69/+61
2020-05-24Minor fixes, as requested in PR reviewMichal Sudwoj-22/+53
2020-05-24NVPTX support for new asm!Michal Sudwoj-0/+109
2020-05-18Fix testsAmanieu d'Antras-0/+1
2020-05-18Disable asm tests on system llvmAmanieu d'Antras-0/+7
2020-05-18The h modifier is only supported by reg_abcdAmanieu d'Antras-7/+0
2020-05-18Add support for high byte registers on x86Amanieu d'Antras-14/+6
2020-05-18Add tests for asm!Amanieu d'Antras-0/+2189
2019-06-12Ignore NVPTX testsJohn Kåre Alsaker-0/+9
2019-04-22Remove double trailing newlinesvarkor-1/+0
2019-02-27Introduce assembly testsDenys Zariaiev-0/+293