Skip to content

Commit 4c72fcc

Browse files
fmckeoghGasper
authored andcommitted
Replace ArgType and FnType with ArgAbi and FnAbi in librustc_target::abi::call::xtensa
1 parent 80393ca commit 4c72fcc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/librustc_target/abi/call/xtensa.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// reference: https://github.com/espressif/clang-xtensa/commit/6fb488d2553f06029e6611cf81c6efbd45b56e47#diff-aa74ae1e1ab6b7149789237edb78e688R8450
22

33

4-
use crate::abi::call::{ArgType, FnType, Reg, Uniform};
4+
use crate::abi::call::{ArgAbi, FnAbi, Reg, Uniform};
55

66
const NUM_ARG_GPR: u64 = 6;
77
const MAX_ARG_IN_REGS_SIZE: u64 = 4 * 32;
88
// const MAX_ARG_DIRECT_SIZE : u64 = MAX_ARG_IN_REGS_SIZE;
99
const MAX_RET_IN_REGS_SIZE: u64 = 2 * 32;
1010

11-
fn classify_ret_ty<Ty>(arg: &mut ArgType<'_, Ty>, xlen: u64) {
11+
fn classify_ret_ty<Ty>(arg: &mut ArgAbi<'_, Ty>, xlen: u64) {
1212
// The rules for return and argument types are the same, so defer to
1313
// classifyArgumentType.
1414
classify_arg_ty(arg, xlen, &mut 2); // two as max return size
1515
}
1616

1717

18-
fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>, xlen: u64, remaining_gpr: &mut u64) {
18+
fn classify_arg_ty<Ty>(arg: &mut ArgAbi<'_, Ty>, xlen: u64, remaining_gpr: &mut u64) {
1919
// Determine the number of GPRs needed to pass the current argument
2020
// according to the ABI. 2*XLen-aligned varargs are passed in "aligned"
2121
// register pairs, so may consume 3 registers.
@@ -62,21 +62,21 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>, xlen: u64, remaining_gpr: &mut
6262
arg.make_indirect();
6363
}
6464

65-
pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>, xlen: u64) {
66-
if !fty.ret.is_ignore() {
67-
classify_ret_ty(&mut fty.ret, xlen);
65+
pub fn compute_abi_info<Ty>(fabi: &mut FnAbi<'_, Ty>, xlen: u64) {
66+
if !fabi.ret.is_ignore() {
67+
classify_ret_ty(&mut fabi.ret, xlen);
6868
}
6969

70-
let return_indirect = fty.ret.layout.size.bits() > MAX_RET_IN_REGS_SIZE ||
71-
fty.ret.is_indirect();
70+
let return_indirect = fabi.ret.layout.size.bits() > MAX_RET_IN_REGS_SIZE ||
71+
fabi.ret.is_indirect();
7272

7373
let mut remaining_gpr = if return_indirect {
7474
NUM_ARG_GPR - 1
7575
} else {
7676
NUM_ARG_GPR
7777
};
7878

79-
for arg in &mut fty.args {
79+
for arg in &mut fabi.args {
8080
if arg.is_ignore() {
8181
continue;
8282
}

0 commit comments

Comments
 (0)