@@ -139,7 +139,7 @@ fn emit_load_value(cb: &mut CodeBlock, rd: A64Opnd, value: u64) -> usize {
139139 // If the value fits into a single movz
140140 // instruction, then we'll use that.
141141 movz ( cb, rd, A64Opnd :: new_uimm ( current) , 0 ) ;
142- return 1 ;
142+ 1
143143 } else if u16:: try_from ( !value) . is_ok ( ) {
144144 // For small negative values, use a single movn
145145 movn ( cb, rd, A64Opnd :: new_uimm ( !value) , 0 ) ;
@@ -182,7 +182,7 @@ fn emit_load_value(cb: &mut CodeBlock, rd: A64Opnd, value: u64) -> usize {
182182/// List of registers that can be used for register allocation.
183183/// This has the same number of registers for x86_64 and arm64.
184184/// SCRATCH0 and SCRATCH1 are excluded.
185- pub const ALLOC_REGS : & ' static [ Reg ] = & [
185+ pub const ALLOC_REGS : & [ Reg ] = & [
186186 X0_REG ,
187187 X1_REG ,
188188 X2_REG ,
@@ -480,7 +480,7 @@ impl Assembler
480480 // which is both the return value and first argument register
481481 if !opnds. is_empty ( ) {
482482 let mut args: Vec < ( Reg , Opnd ) > = vec ! [ ] ;
483- for ( idx, opnd) in opnds. into_iter ( ) . enumerate ( ) . rev ( ) {
483+ for ( idx, opnd) in opnds. iter_mut ( ) . enumerate ( ) . rev ( ) {
484484 // If the value that we're sending is 0, then we can use
485485 // the zero register, so in this case we'll just send
486486 // a UImm of 0 along as the argument to the move.
@@ -1106,8 +1106,8 @@ impl Assembler
11061106 // be stored is first and the address is second. However in
11071107 // our IR we have the address first and the register second.
11081108 match dest_num_bits {
1109- 64 | 32 => stur ( cb, src. into ( ) , dest. into ( ) ) ,
1110- 16 => sturh ( cb, src. into ( ) , dest. into ( ) ) ,
1109+ 64 | 32 => stur ( cb, src, dest) ,
1110+ 16 => sturh ( cb, src, dest) ,
11111111 num_bits => panic ! ( "unexpected dest num_bits: {} (src: {:#?}, dest: {:#?})" , num_bits, src, dest) ,
11121112 }
11131113 } ,
@@ -1411,7 +1411,7 @@ impl Assembler
14111411///
14121412/// If a, b, and c are all registers.
14131413fn merge_three_reg_mov (
1414- live_ranges : & Vec < LiveRange > ,
1414+ live_ranges : & [ LiveRange ] ,
14151415 iterator : & mut std:: iter:: Peekable < impl Iterator < Item = ( usize , Insn ) > > ,
14161416 left : & Opnd ,
14171417 right : & Opnd ,
0 commit comments