about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/abi.rs
AgeCommit message (Collapse)AuthorLines
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.
2018-07-12Auto merge of #52089 - eddyb:issue-51907, r=nagisabors-37/+43
rustc_codegen_llvm: replace the first argument early in FnType::new_vtable. Fixes #51907 by removing the vtable pointer before the `ArgType` is even created. This allows any ABI to support trait object method calls, regardless of how it passes `*dyn Trait`. r? @nikomatsakis
2018-07-10Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrumbors-2/+2
Store scalar pair bools as i8 in memory We represent `bool` as `i1` in a `ScalarPair`, unlike other aggregates, to optimize IR for checked operators and the like. With this patch, we still do so when the pair is an immediate value, but we use the `i8` memory type when the value is loaded or stored as an LLVM aggregate. So `(bool, bool)` looks like an `{ i1, i1 }` immediate, but `{ i8, i8 }` in memory. When a pair is a direct function argument, `PassMode::Pair`, it is still passed using the immediate `i1` type, but as a return value it will use the `i8` memory type. Also, `bool`-like` enum tags will now use scalar pairs when possible, where they were previously excluded due to optimization issues. Fixes #51516. Closes #51566. r? @eddyb cc @nox
2018-07-09bump minimum LLVM version to 5.0gnzlbg-5/+1
2018-07-06rustc_codegen_llvm: replace the first argument early in FnType::new_vtable.Eduard-Mihai Burtescu-37/+43
2018-07-05Store scalar pair bools as i8 in memoryJosh Stone-2/+2
We represent `bool` as `i1` in a `ScalarPair`, unlike other aggregates, to optimize IR for checked operators and the like. With this patch, we still do so when the pair is an immediate value, but we use the `i8` memory type when the value is loaded or stored as an LLVM aggregate. So `(bool, bool)` looks like an `{ i1, i1 }` immediate, but `{ i8, i8 }` in memory. When a pair is a direct function argument, `PassMode::Pair`, it is still passed using the immediate `i1` type, but as a return value it will use the `i8` memory type. Also, `bool`-like` enum tags will now use scalar pairs when possible, where they were previously excluded due to optimization issues.
2018-05-24Add constant for `Size::from_bytes(0)`Oliver Schneider-2/+2
2018-05-19use if let to avoid potential div by zerocjkenn-2/+6
remove semicolon -_- Add rem_bytes to conditional to avoid error when performing mod by 0 Add test file to confirm compilation passes. Ensure we don't divide or mod by zero in llvm_type. Include test file from issue.
2018-05-17Rename trans to codegen everywhere.Irina Popa-0/+696