about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
AgeCommit message (Collapse)AuthorLines
2021-12-10Rollup merge of #91625 - est31:remove_indexes, r=oli-obkMatthias Krüger-2/+2
Remove redundant [..]s
2021-12-09Rollup merge of #90796 - Amanieu:remove_reg_thumb, r=joshtriplettMatthias Krüger-5/+2
Remove the reg_thumb register class for asm! on ARM Also restricts r8-r14 from being used on Thumb1 targets as per #90736. cc ``@Lokathor`` r? ``@joshtriplett``
2021-12-09Remove redundant [..]sest31-2/+2
2021-12-08Auto merge of #91604 - nikic:section-flags, r=nagisabors-44/+0
Use object crate for .rustc metadata generation We already use the object crate for generating uncompressed .rmeta metadata object files. This switches the generation of compressed .rustc object files to use the object crate as well. These have slightly different requirements in that .rmeta should be completely excluded from any final compilation artifacts, while .rustc should be part of shared objects, but not loaded into memory. The primary motivation for this change is #90326: In LLVM 14, the current way of setting section flags (and in particular, preventing the setting of SHF_ALLOC) will no longer work. There are other ways we could work around this, but switching to the object crate seems like the most elegant, as we already use it for .rmeta, and as it makes this independent of the codegen backend. In particular, we don't need separate handling in codegen_llvm and codegen_gcc. codegen_cranelift should be able to reuse the implementation as well, though I have omitted that here, as it is not based on codegen_ssa. This change mostly extracts the existing code for .rmeta handling to allow using it for .rustc as well, and adjusts the codegen infrastructure to handle the metadata object file separately: We no longer create a backend-specific module for it, and directly produce the compiled module instead. This does not `fix` #90326 by itself yet, as .llvmbc will need to be handled separately. r? `@nagisa`
2021-12-07Remove the reg_thumb register class for asm! on ARMAmanieu d'Antras-5/+2
Also restricts r8-r14 from being used on Thumb1 targets as per #90736.
2021-12-07Use object crate for .rustc metadata generationNikita Popov-44/+0
We already use the object crate for generating uncompressed .rmeta metadata object files. This switches the generation of compressed .rustc object files to use the object crate as well. These have slightly different requirements in that .rmeta should be completely excluded from any final compilation artifacts, while .rustc should be part of shared objects, but not loaded into memory. The primary motivation for this change is #90326: In LLVM 14, the current way of setting section flags (and in particular, preventing the setting of SHF_ALLOC) will no longer work. There are other ways we could work around this, but switching to the object crate seems like the most elegant, as we already use it for .rmeta, and as it makes this independent of the codegen backend. In particular, we don't need separate handling in codegen_llvm and codegen_gcc. codegen_cranelift should be able to reuse the implementation as well, though I have omitted that here, as it is not based on codegen_ssa. This change mostly extracts the existing code for .rmeta handling to allow using it for .rustc as well, and adjust the codegen infrastructure to handle the metadata object file separately: We no longer create a backend-specific module for it, and directly produce the compiled module instead. This does not fix #90326 by itself yet, as .llvmbc will need to be handled separately.
2021-12-06Implement inline asm! for AVR platformAndrew Dona-Couch-0/+3
2021-12-03rustc_codegen_gcc: proper check for may_unwindcynecx-2/+2
2021-12-03rustc_codegen_gcc: error on unwinding inline asmcynecx-1/+8
2021-12-02Auto merge of #91003 - psumbera:sparc64-abi, r=nagisabors-2/+2
fix sparc64 ABI for aggregates with floating point members Fixes #86163
2021-12-01fix sparc64 ABI for aggregates with floating point membersPetr Sumbera-2/+2
2021-11-23Feat: make cg_ssa get_param borrow the builder mutablerdambrosio-1/+1
2021-11-14Remove workaround for the forward progress handling in LLVMAndreas Jonson-5/+1
2021-10-27Auto merge of #89652 - rcvalle:rust-cfi, r=nagisabors-0/+15
Add LLVM CFI support to the Rust compiler This PR adds LLVM Control Flow Integrity (CFI) support to the Rust compiler. It initially provides forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their number of arguments. Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by defining and using compatible type identifiers (see Type metadata in the design document in the tracking issue #89653). LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto). Thank you, `@eddyb` and `@pcc,` for all the help!
2021-10-26Properly check `target_features` not to trigger an assertionYuki Okushi-1/+1
2021-10-25Add LLVM CFI support to the Rust compilerRamon de C Valle-0/+15
This commit adds LLVM Control Flow Integrity (CFI) support to the Rust compiler. It initially provides forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their number of arguments. Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by defining and using compatible type identifiers (see Type metadata in the design document in the tracking issue #89653). LLVM CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto).
2021-10-20Make hash_result an Option.Camille GILLOT-1/+7
2021-10-15Remove alloc::preludeAmanieu d'Antras-2/+2
As per the libs team decision in #58935. Closes #58935
2021-10-11Auto merge of #89597 - michaelwoerister:improve-vtable-debuginfo, r=wesleywiserbors-2/+2
Create more accurate debuginfo for vtables. Before this PR all vtables would have the same name (`"vtable"`) in debuginfo. Now they get an unambiguous name that identifies the implementing type and the trait that is being implemented. This is only one of several possible improvements: - This PR describes vtables as arrays of `*const u8` pointers. It would nice to describe them as structs where function pointer is represented by a field with a name indicative of the method it maps to. However, this requires coming up with a naming scheme that avoids clashes between methods with the same name (which is possible if the vtable contains multiple traits). - The PR does not update the debuginfo we generate for the vtable-pointer field in a fat `dyn` pointer. Right now there does not seem to be an easy way of getting ahold of a vtable-layout without also knowing the concrete self-type of a trait object. r? `@wesleywiser`
2021-10-08Create more accurate debuginfo for vtables.Michael Woerister-2/+2
Before this commit all vtables would have the same name "vtable" in debuginfo. Now they get a name that identifies the implementing type and the trait that is being implemented.
2021-10-03Move rustc_middle::middle::cstore to rustc_session.Camille GILLOT-3/+2
2021-09-30Rebase fallout.Camille GILLOT-3/+3
2021-09-28Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegenAntoni Boucher-3/+3
2021-09-28Merge commit '9809f5d21990d9e24b3e9876ea7da756fd4e9def' into libgccjit-codegenAntoni Boucher-559/+559
2021-09-17Merge commit '48d60ab7c505c6c1ebb042eacaafd8dc9f7a9267' into libgccjit-codegenAntoni Boucher-348/+735
2021-08-15Merge commit '6f50986667debbfc67776304a8ee23fe0158613f' into libgccjit-codegenAntoni Boucher-1/+0
2021-08-15Merge commit 'e228f0c16ea8c34794a6285bf57aab627c26b147' into libgccjit-codegenAntoni Boucher-3053/+265
2021-08-14Merge commit '0c89065b934397b62838fe3e4ef6f6352fc52daf' into libgccjit-codegenAntoni Boucher-19/+42
2021-08-12Add 'compiler/rustc_codegen_gcc/' from commit ↵Antoni Boucher-0/+15608
'afae271d5d3719eeb92c18bc004bb6d1965a5f3f' git-subtree-dir: compiler/rustc_codegen_gcc git-subtree-mainline: ae90dcf0207c57c3034f00b07048d63f8b2363c8 git-subtree-split: afae271d5d3719eeb92c18bc004bb6d1965a5f3f