about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/abi.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-502/+0
2020-07-22[AVR] Correctly set the pointer address space when constructing pointers to ↵Dylan McKay-1/+1
functions This patch extends the existing `type_i8p` method so that it requires an explicit address space to be specified. Before this patch, the `type_i8p` method implcitily assumed the default address space, which is not a safe transformation on all targets, namely AVR. The Rust compiler already has support for tracking the "instruction address space" on a per-target basis. This patch extends the code generation routines so that an address space must always be specified. In my estimation, around 15% of the callers of `type_i8p` produced invalid code on AVR due to the loss of address space prior to LLVM final code generation. This would lead to unavoidable assertion errors relating to invalid bitcasts. With this patch, the address space is always either 1) explicitly set to the instruction address space because the logic is dealing with functions which must be placed there, or 2) explicitly set to the default address space 0 because the logic can only operate on data space pointers and thus we keep the existing semantics of assuming the default, "data" address space.
2020-06-09[AVR] Add AVR platform supportJake Goulding-0/+2
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-8/+6
2020-03-31Address review feedbackWesley Wiser-0/+7
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-3/+3
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-4/+4
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-1/+1
2019-12-22Format the worldMark Rousskov-61/+61
2019-12-11Fix fallout from rebaseAaron Hill-1/+0
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+2
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-12-03rustc_target: add abi::call::Conv::Rust distinct from Conv::C.Eduard-Mihai Burtescu-1/+1
2019-12-03rustc_codegen_llvm: move NoReturn attribute to apply_attrs_llfn.Eduard-Mihai Burtescu-0/+5
2019-11-21Aggregation of drive-by cosmetic changes.Alexander Regueiro-8/+7
2019-11-03rustc_codegen_ssa: rename FnTypeLlvmExt to FnAbiLlvmExt.Eduard-Mihai Burtescu-2/+2
2019-11-03rustc_codegen_ssa: rename ArgTypeMethods to ArgAbiMethods.Eduard-Mihai Burtescu-1/+1
2019-11-03rustc: rename {Fn,Arg}TypeExt to {Fn,Arg}AbiExt.Eduard-Mihai Burtescu-2/+2
2019-11-03rustc_target: rename {Fn,Arg}Type to {Fn,Arg}Abi.Eduard-Mihai Burtescu-14/+14
2019-09-28rustc: rely on c_variadic == true instead of CVarArgs in HIR/Ty fn signatures.Eduard-Mihai Burtescu-7/+5
2019-09-12codegen: be more explicit about setting giving names to allocas.Eduard-Mihai Burtescu-1/+1
2019-07-09Pass type to byval attributesNikita Popov-29/+35
2019-05-14removes `AbiMethods`Saleem Jaffer-18/+2
2019-05-14refactor completeSaleem Jaffer-372/+7
2019-05-14some more refactor of FnType. Things build nowSaleem Jaffer-3/+294
2019-05-10refactor some `FnType` stuff to `rustc::ty::layout`Saleem Jaffer-291/+0
2019-05-04removing param_env from pointee_info_atSaleem Jaffer-2/+2
2019-05-04resolving conflictsSaleem Jaffer-7/+1
2019-05-04impl `pointee_info_at` in TyLayout.Daan de Graaf-2/+2
2019-05-04Remove old pointee_info_at body.Daan de Graaf-1/+7
2019-04-26Update handling of Tuplevarkor-4/+4
2019-04-04Fix cases of conflicting two-phase borrowsMatthew Jasper-1/+2
2019-03-29Move get_param and set_value_namebjorn3-0/+4
2019-02-27Rename variadic to c_variadicDan Robertson-5/+5
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-27Support defining C compatible variadic functionsDan Robertson-6/+39
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-18librustc_codegen_llvm => 2018Taiki Endo-6/+6
2019-02-10rustc: doc commentsAlexander Regueiro-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-24Rollup merge of #57085 - glaubitz:sparc64-abi-fix, r=nagisaMazdak Farrokhzad-2/+6
librustc_codegen_llvm: Don't eliminate empty structs in C ABI on linux-sparc64 This is in accordance with the SPARC Compliance Definition 2.4.1, Page 3P-12. It says that structs of up to 8 bytes (which applies to empty structs as well) are to be passed in one register.
2018-12-23librustc_codegen_llvm: Don't eliminate empty structs in C ABI on linux-sparc64Michael Karcher-2/+6
This is in accordance with the SPARC Compliance Definition 2.4.1, Page 3P-12. It says that structs of up to 8 bytes (which applies to empty structs as well) are to be passed in one register.
2018-12-21Enable emission of alignment attrs for pointer paramsNikita Popov-6/+0
Instead disable creation of assumptions during inlining using an LLVM opt flag. The -Z arg-align-attributes option which previously controlled this behavior is removed.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-29Use implicit deref instead of BuilderMethods::cx()bjorn3-7/+7
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-7/+7
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-2/+2
2018-11-16[eddyb] rustc_codegen_ssa: rename `interfaces` to `traits`.Eduard-Mihai Burtescu-1/+1
2018-11-16All Builder methods now take &mut self instead of &selfDenis Merigoux-17/+17
2018-11-16Finished moving backend-agnostic code to rustc_codegen_ssaDenis Merigoux-4/+5
2018-11-16Generalized mir::codegen_mir (and all subsequent functions)Denis Merigoux-2/+50
2018-11-16Transfered memcpy and memset to BuilderMethodsDenis Merigoux-8/+8
2018-11-16Generalized memset and memcpyDenis Merigoux-1/+1