about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/abi.rs
AgeCommit message (Collapse)AuthorLines
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
2018-11-16Removing LLVM content from CommonMethods -> ConstMethodsDenis Merigoux-1/+1
2018-11-16Prefixed type methods & removed trait impl for write::CodegenContextDenis Merigoux-16/+16
2018-11-16Prefixed const methods with "const" instead of "c"Denis Merigoux-1/+1
2018-11-16Traitification of type_ methodsDenis Merigoux-17/+17
The methods are now attached to CodegenCx instead of Type
2018-11-16Use the method form for CodegenCx everywhereDenis Merigoux-1/+1
2018-11-16Replaced Codegen field access by trait methodDenis Merigoux-2/+2
2018-11-16Traitification of common.rs methodsDenis Merigoux-3/+2
2018-11-16New files and folders for traitsDenis Merigoux-1/+1
Moved common enums to common
2018-11-16Removed genericity over Value in various functionsDenis Merigoux-4/+4
Prelude to using associated types in traits rather than type parameters
2018-11-16Generalized base.rs#call_memcpy and everything that it usesDenis Merigoux-6/+18
Generalized operand.rs#nontemporal_store and fixed tidy issues Generalized operand.rs#nontemporal_store's implem even more With a BuilderMethod trait implemented by Builder for LLVM Cleaned builder.rs : no more code duplication, no more ValueTrait Full traitification of builder.rs
2018-11-16Reduced line length to pass tidyDenis Merigoux-1/+1
Generalized FunctionCx Added ValueTrait and first change Generalize CondegenCx Generalized the Builder struct defined in librustc_codegen_llvm/builder.rs
2018-11-16rustc_codegen_llvm: begin generalizing over backend values.Irina Popa-4/+14
2018-11-11Auto merge of #54993 - TimNN:pda-tdl, r=eddybbors-1/+9
Support for the program data address space option of LLVM's Target Datalayout This was introduced recently (specifically, for AVR, cc @dylanmckay). (I came up with this when attempting to run [avr-rust](https://github.com/avr-rust/rust) rebased on the latest [rust-lang](https://github.com/rust-lang/rust) commits. If this requires a different design, some additional discussions, or is not something to pursue right now, I'd be happy to close this PR). Note that this somewhat overlaps with @DiamondLovesYou's #51576, I think, although the implementation here is significantly simpler: Since the address space applies to _all_ program data, we can just check the pointee's type whenever we create an LLVM pointer type. If it is a function we use the program data address space; if not we use the default address space. cc @eddyb, who has been reviewing #51576 Ref: https://llvm.org/docs/LangRef.html#data-layout
2018-11-08Support for the program data address space optionTim Neumann-1/+9
of LLVM's Target Datalayout. https://llvm.org/docs/LangRef.html#data-layout
2018-11-04Support memcpy/memmove with differing src/dst alignmentNikita Popov-1/+2
If LLVM 7 is used, generate memcpy/memmove with differing src/dst alignment. I've added new FFI functions to construct these through the builder API, which is more convenient than dealing with differing intrinsic signatures depending on the LLVM version.
2018-11-01Add comments explaining how codegen works for `dyn Trait` methodsMichael Hewson-0/+5
2018-11-01Implement object-safety for arbitrary_self_types: part 2Michael Hewson-13/+36
For now, all of the receivers that we care about are just a newtyped pointer — i.e. `Box<Self>`, `Rc<Self>`, `Pin<Box<Self>>`, `Pin<&mut Self>`. This is much simpler to implement in codeine than the more general case, because the ABI is the same as a pointer. So we add some checks in typeck/coherence/builtin.rs to make sure that implementors of CoerceSized are just newtyped pointers. In this commit, we also implement the codegen bits.
2018-10-24Move codegen_llvm::common::ty_fn_sig into rustc::ty::Instance.Masaki Hara-3/+2
2018-10-24Implement by-value trait object method call.Masaki Hara-8/+8
2018-10-12rustc: Allow targets to specify SIMD args are by-valAlex Crichton-1/+4
The upcoming SIMD support in the wasm target is unique from the other platforms where it's either unconditionally available or not available, there's no halfway where a subsection of the program can use it but no other parts of the program can use it. In this world it's valid for wasm SIMD args to always be passed by value and there's no need to pass them by reference. This commit adds a new custom target specification option `simd_types_indirect` which defaults to `true`, but the wasm backend disables this and sets it to `false`.
2018-10-08codegen_llvm: fix spelling & grammatical errorsljedrz-1/+1
2018-10-08codegen_llvm: improve common patternsljedrz-3/+2
2018-10-08codegen_llvm: whitespace & formatting improvementsljedrz-9/+7
2018-08-22Remove Ty prefix from ↵varkor-1/+1
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-19Integrate OperandValue::UnsizedRef into OperandValue::Ref.Masaki Hara-2/+2
2018-08-19Integrate PassMode::UnsizedIndirect into PassMode::Indirect.Masaki Hara-18/+15
2018-08-19Implement simple codegen for unsized rvalues.Masaki Hara-1/+28
2018-07-30rustc_codegen_llvm: use safe references for Value.Irina Popa-31/+32
2018-07-30rustc_codegen_llvm: use safe references for Type.Irina Popa-17/+17
2018-07-20Refactor a few push loops to iterators in librustcljedrz-1/+7
2018-07-13Add the `amdgpu-kernel` ABI.Richard Diamond-0/+2
Technically, there are requirements imposed by the LLVM `AMDGPUTargetMachine` on functions with this ABI (eg, the return type must be void), but I'm unsure exactly where this should be enforced.