Skip to content

Commit 030244c

Browse files
committed
rustc_target: move in cabi_* from rustc_trans.
1 parent fb15d44 commit 030244c

28 files changed

+645
-613
lines changed

src/librustc_target/abi/call.rs

-214
This file was deleted.

src/librustc_trans/cabi_aarch64.rs src/librustc_target/abi/call/aarch64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use abi::{FnType, ArgType, LayoutExt, Reg, RegKind, Uniform};
12-
use rustc_target::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
11+
use abi::call::{FnType, ArgType, Reg, RegKind, Uniform};
12+
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
1313

1414
fn is_homogeneous_aggregate<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
1515
-> Option<Uniform>

src/librustc_trans/cabi_arm.rs src/librustc_target/abi/call/arm.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use abi::{FnType, ArgType, LayoutExt, Reg, RegKind, Uniform};
12-
use rustc_target::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
13-
use rustc_target::spec::HasTargetSpec;
14-
use llvm::CallConv;
11+
use abi::call::{Conv, FnType, ArgType, Reg, RegKind, Uniform};
12+
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
13+
use spec::HasTargetSpec;
1514

1615
fn is_homogeneous_aggregate<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
1716
-> Option<Uniform>
@@ -109,7 +108,7 @@ pub fn compute_abi_info<'a, Ty, C>(cx: C, fty: &mut FnType<'a, Ty>)
109108
// If this is a target with a hard-float ABI, and the function is not explicitly
110109
// `extern "aapcs"`, then we must use the VFP registers for homogeneous aggregates.
111110
let vfp = cx.target_spec().llvm_target.ends_with("hf")
112-
&& fty.cconv != CallConv::ArmAapcsCallConv
111+
&& fty.conv != Conv::ArmAapcs
113112
&& !fty.variadic;
114113

115114
if !fty.ret.is_ignore() {

src/librustc_trans/cabi_asmjs.rs src/librustc_target/abi/call/asmjs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use abi::{FnType, ArgType, LayoutExt, Uniform};
12-
use rustc_target::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
11+
use abi::call::{FnType, ArgType, Uniform};
12+
use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods};
1313

1414
// Data layout: e-p:32:32-i64:64-v128:32:128-n32-S128
1515

src/librustc_trans/cabi_hexagon.rs src/librustc_target/abi/call/hexagon.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![allow(non_upper_case_globals)]
1212

13-
use abi::{FnType, ArgType, LayoutExt};
13+
use abi::call::{FnType, ArgType};
1414

1515
fn classify_ret_ty<Ty>(ret: &mut ArgType<Ty>) {
1616
if ret.layout.is_aggregate() && ret.layout.size.bits() > 64 {

src/librustc_trans/cabi_mips.rs src/librustc_target/abi/call/mips.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use abi::{ArgType, FnType, LayoutExt, Reg, Uniform};
12-
13-
use rustc_target::abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
11+
use abi::call::{ArgType, FnType, Reg, Uniform};
12+
use abi::{HasDataLayout, LayoutOf, Size, TyLayoutMethods};
1413

1514
fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<Ty>, offset: &mut Size)
1615
where Ty: TyLayoutMethods<'a, C>, C: LayoutOf<Ty = Ty> + HasDataLayout

src/librustc_trans/cabi_mips64.rs src/librustc_target/abi/call/mips64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use abi::{ArgAttribute, ArgType, CastTarget, FnType, LayoutExt, PassMode, Reg, RegKind, Uniform};
12-
use rustc_target::abi::{self, HasDataLayout, LayoutOf, Size, TyLayout, TyLayoutMethods};
11+
use abi::call::{ArgAttribute, ArgType, CastTarget, FnType, PassMode, Reg, RegKind, Uniform};
12+
use abi::{self, HasDataLayout, LayoutOf, Size, TyLayout, TyLayoutMethods};
1313

1414
fn extend_integer_width_mips<Ty>(arg: &mut ArgType<Ty>, bits: u64) {
1515
// Always sign extend u32 values on 64-bit mips

0 commit comments

Comments
 (0)