1- use  crate :: abi:: call:: { 
2-     ArgAbi ,  ArgAttribute ,  ArgAttributes ,  ArgExtension ,  CastTarget ,  FnAbi ,  PassMode ,  Reg ,  Uniform , 
1+ use  rustc_abi:: { 
2+     BackendRepr ,  FieldsShape ,  Float ,  HasDataLayout ,  Primitive ,  Reg ,  Size ,  TyAbiInterface , 
3+ } ; 
4+ 
5+ use  crate :: callconv:: { 
6+     ArgAbi ,  ArgAttribute ,  ArgAttributes ,  ArgExtension ,  CastTarget ,  FnAbi ,  PassMode ,  Uniform , 
37} ; 
4- use  crate :: abi:: { self ,  HasDataLayout ,  Size ,  TyAbiInterface } ; 
58
69fn  extend_integer_width_mips < Ty > ( arg :  & mut  ArgAbi < ' _ ,  Ty > ,  bits :  u64 )  { 
710    // Always sign extend u32 values on 64-bit mips 
8-     if  let  abi :: BackendRepr :: Scalar ( scalar)  = arg. layout . backend_repr  { 
9-         if  let  abi :: Int ( i,  signed)  = scalar. primitive ( )  { 
11+     if  let  BackendRepr :: Scalar ( scalar)  = arg. layout . backend_repr  { 
12+         if  let  Primitive :: Int ( i,  signed)  = scalar. primitive ( )  { 
1013            if  !signed && i. size ( ) . bits ( )  == 32  { 
1114                if  let  PassMode :: Direct ( ref  mut  attrs)  = arg. mode  { 
1215                    attrs. ext ( ArgExtension :: Sext ) ; 
2528    C :  HasDataLayout , 
2629{ 
2730    match  ret. layout . field ( cx,  i) . backend_repr  { 
28-         abi :: BackendRepr :: Scalar ( scalar)  => match  scalar. primitive ( )  { 
29-             abi :: Float ( abi :: F32 )  => Some ( Reg :: f32 ( ) ) , 
30-             abi :: Float ( abi :: F64 )  => Some ( Reg :: f64 ( ) ) , 
31+         BackendRepr :: Scalar ( scalar)  => match  scalar. primitive ( )  { 
32+             Primitive :: Float ( Float :: F32 )  => Some ( Reg :: f32 ( ) ) , 
33+             Primitive :: Float ( Float :: F64 )  => Some ( Reg :: f64 ( ) ) , 
3134            _ => None , 
3235        } , 
3336        _ => None , 
5154        // use of float registers to structures (not unions) containing exactly one or two 
5255        // float fields. 
5356
54-         if  let  abi :: FieldsShape :: Arbitrary  {  .. }  = ret. layout . fields  { 
57+         if  let  FieldsShape :: Arbitrary  {  .. }  = ret. layout . fields  { 
5558            if  ret. layout . fields . count ( )  == 1  { 
5659                if  let  Some ( reg)  = float_reg ( cx,  ret,  0 )  { 
5760                    ret. cast_to ( reg) ; 
@@ -90,16 +93,16 @@ where
9093    let  mut  prefix_index = 0 ; 
9194
9295    match  arg. layout . fields  { 
93-         abi :: FieldsShape :: Primitive  => unreachable ! ( ) , 
94-         abi :: FieldsShape :: Array  {  .. }  => { 
96+         FieldsShape :: Primitive  => unreachable ! ( ) , 
97+         FieldsShape :: Array  {  .. }  => { 
9598            // Arrays are passed indirectly 
9699            arg. make_indirect ( ) ; 
97100            return ; 
98101        } 
99-         abi :: FieldsShape :: Union ( _)  => { 
102+         FieldsShape :: Union ( _)  => { 
100103            // Unions and are always treated as a series of 64-bit integer chunks 
101104        } 
102-         abi :: FieldsShape :: Arbitrary  {  .. }  => { 
105+         FieldsShape :: Arbitrary  {  .. }  => { 
103106            // Structures are split up into a series of 64-bit integer chunks, but any aligned 
104107            // doubles not part of another aggregate are passed as floats. 
105108            let  mut  last_offset = Size :: ZERO ; 
@@ -109,8 +112,8 @@ where
109112                let  offset = arg. layout . fields . offset ( i) ; 
110113
111114                // We only care about aligned doubles 
112-                 if  let  abi :: BackendRepr :: Scalar ( scalar)  = field. backend_repr  { 
113-                     if  scalar. primitive ( )  == abi :: Float ( abi :: F64 )  { 
115+                 if  let  BackendRepr :: Scalar ( scalar)  = field. backend_repr  { 
116+                     if  scalar. primitive ( )  == Primitive :: Float ( Float :: F64 )  { 
114117                        if  offset. is_aligned ( dl. f64_align . abi )  { 
115118                            // Insert enough integers to cover [last_offset, offset) 
116119                            assert ! ( last_offset. is_aligned( dl. f64_align. abi) ) ; 
0 commit comments