diff options
Diffstat (limited to 'src/librustc_trans/trans/cabi_mips.rs')
| -rw-r--r-- | src/librustc_trans/trans/cabi_mips.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/librustc_trans/trans/cabi_mips.rs b/src/librustc_trans/trans/cabi_mips.rs index bc171e3ae43..2d7fdd2f2eb 100644 --- a/src/librustc_trans/trans/cabi_mips.rs +++ b/src/librustc_trans/trans/cabi_mips.rs @@ -19,18 +19,18 @@ use trans::cabi::{ArgType, FnType}; use trans::context::CrateContext; use trans::type_::Type; -fn align_up_to(off: uint, a: uint) -> uint { +fn align_up_to(off: usize, a: usize) -> usize { return (off + a - 1) / a * a; } -fn align(off: uint, ty: Type) -> uint { +fn align(off: usize, ty: Type) -> usize { let a = ty_align(ty); return align_up_to(off, a); } -fn ty_align(ty: Type) -> uint { +fn ty_align(ty: Type) -> usize { match ty.kind() { - Integer => ((ty.int_width() as uint) + 7) / 8, + Integer => ((ty.int_width() as usize) + 7) / 8, Pointer => 4, Float => 4, Double => 8, @@ -55,9 +55,9 @@ fn ty_align(ty: Type) -> uint { } } -fn ty_size(ty: Type) -> uint { +fn ty_size(ty: Type) -> usize { match ty.kind() { - Integer => ((ty.int_width() as uint) + 7) / 8, + Integer => ((ty.int_width() as usize) + 7) / 8, Pointer => 4, Float => 4, Double => 8, @@ -96,7 +96,7 @@ fn classify_ret_ty(ccx: &CrateContext, ty: Type) -> ArgType { } } -fn classify_arg_ty(ccx: &CrateContext, ty: Type, offset: &mut uint) -> ArgType { +fn classify_arg_ty(ccx: &CrateContext, ty: Type, offset: &mut usize) -> ArgType { let orig_offset = *offset; let size = ty_size(ty) * 8; let mut align = ty_align(ty); @@ -129,7 +129,7 @@ fn is_reg_ty(ty: Type) -> bool { }; } -fn padding_ty(ccx: &CrateContext, align: uint, offset: uint) -> Option<Type> { +fn padding_ty(ccx: &CrateContext, align: usize, offset: usize) -> Option<Type> { if ((align - 1 ) & offset) > 0 { Some(Type::i32(ccx)) } else { @@ -137,7 +137,7 @@ fn padding_ty(ccx: &CrateContext, align: uint, offset: uint) -> Option<Type> { } } -fn coerce_to_int(ccx: &CrateContext, size: uint) -> Vec<Type> { +fn coerce_to_int(ccx: &CrateContext, size: usize) -> Vec<Type> { let int_ty = Type::i32(ccx); let mut args = Vec::new(); |
