File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
winch/codegen/src/codegen Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -845,12 +845,12 @@ where
845
845
Ok ( addr)
846
846
}
847
847
848
+ /// Emit checks to ensure that the address at `memarg` is correctly aligned for `size`.
848
849
fn check_align ( & mut self , memarg : & MemArg , size : OperandSize ) -> Result < ( ) > {
849
850
if size. bytes ( ) > 1 {
850
851
let addr = * self . context . stack . peek ( ) . unwrap ( ) ;
851
852
let tmp = self . context . any_gpr ( self . masm ) ?;
852
- self . context
853
- . move_val_to_reg ( & addr, tmp, self . masm ) ?;
853
+ self . context . move_val_to_reg ( & addr, tmp, self . masm ) ?;
854
854
if memarg. offset != 0 {
855
855
self . masm . add (
856
856
writable ! ( tmp) ,
@@ -866,8 +866,7 @@ where
866
866
size,
867
867
) ?;
868
868
869
- self . masm
870
- . cmp ( tmp, RegImm :: Imm ( Imm :: i64 ( 0 ) ) , size) ?;
869
+ self . masm . cmp ( tmp, RegImm :: Imm ( Imm :: i64 ( 0 ) ) , size) ?;
871
870
self . masm . trapif ( IntCmpKind :: Ne , TRAP_HEAP_MISALIGNED ) ?;
872
871
873
872
self . context . free_reg ( tmp) ;
You can’t perform that action at this time.
0 commit comments