@@ -1117,29 +1117,26 @@ impl<D: RiscVDisassembler> Architecture for RiscVArch<D> {
11171117 let rs1 = Register :: from( l. rs1( ) ) ;
11181118
11191119 let src_expr = il. add( max_width, rs1, l. imm( ) ) ;
1120- let load_expr = il. load( size, src_expr)
1121- . with_source_operand( LowLevelILOperandIndex ( 1 ) ) ;
1120+ let load_expr = il. load( size, src_expr) . build( ) . with_source_operand( LowLevelILOperandIndex ( 1 ) ) ;
11221121
11231122 match ( size < max_width, l. zx( ) ) {
11241123 ( false , _) => load_expr,
1125- ( true , true ) => il. zx( max_width, load_expr) ,
1126- ( true , false ) => il. sx( max_width, load_expr) ,
1124+ ( true , true ) => il. zx( max_width, load_expr) . build ( ) ,
1125+ ( true , false ) => il. sx( max_width, load_expr) . build ( ) ,
11271126 }
11281127 } ) ,
11291128 Op :: Store ( s) => {
11301129 let size = s. width ( ) ;
11311130 let dest = il. add ( max_width, Register :: from ( s. rs1 ( ) ) , s. imm ( ) ) ;
11321131 let mut src = il
11331132 . expression ( Register :: from ( s. rs2 ( ) ) )
1134- . with_source_operand ( 0 ) ;
1133+ . with_source_operand ( LowLevelILOperandIndex ( 0 ) ) ;
11351134
11361135 if size < max_width {
11371136 src = il. low_part ( size, src) . build ( ) ;
11381137 }
11391138
1140- il. store ( size, dest, src)
1141- . with_source_operand ( LowLevelILOperandIndex ( 1 ) )
1142- . append ( ) ;
1139+ il. store ( size, dest, src) . build ( ) . with_source_operand ( LowLevelILOperandIndex ( 1 ) ) . append ( ) ;
11431140 }
11441141
11451142 Op :: AddI ( i) => simple_i ! ( i, |rs1, imm| il. add( max_width, rs1, imm) ) ,
@@ -1461,12 +1458,11 @@ impl<D: RiscVDisassembler> Architecture for RiscVArch<D> {
14611458
14621459 Op :: Lr ( a) => simple_op ! ( a, no_discard {
14631460 let size = a. width( ) ;
1464- let load_expr = il. load( size, Register :: from( a. rs1( ) ) )
1465- . with_source_operand( LowLevelILOperandIndex ( 1 ) ) ;
1461+ let load_expr = il. load( size, Register :: from( a. rs1( ) ) ) . build( ) . with_source_operand( LowLevelILOperandIndex ( 1 ) ) ;
14661462
14671463 match size == max_width {
14681464 true => load_expr,
1469- false => il. sx( max_width, load_expr) ,
1465+ false => il. sx( max_width, load_expr) . build ( ) ,
14701466 }
14711467 } ) ,
14721468 Op :: Sc ( a) => {
@@ -1499,9 +1495,7 @@ impl<D: RiscVDisassembler> Architecture for RiscVArch<D> {
14991495 il. if_expr ( cond_expr, & mut t, & mut f) . append ( ) ;
15001496
15011497 il. mark_label ( & mut t) ;
1502- il. store ( size, Register :: from ( a. rs1 ( ) ) , Register :: from ( a. rs2 ( ) ) )
1503- . with_source_operand ( LowLevelILOperandIndex ( 2 ) )
1504- . append ( ) ;
1498+ il. store ( size, Register :: from ( a. rs1 ( ) ) , Register :: from ( a. rs2 ( ) ) ) . build ( ) . with_source_operand ( LowLevelILOperandIndex ( 1 ) ) . append ( ) ;
15051499
15061500 if new_false {
15071501 il. mark_label ( & mut f) ;
@@ -1544,10 +1538,11 @@ impl<D: RiscVDisassembler> Architecture for RiscVArch<D> {
15441538
15451539 let mut load_expr = il
15461540 . load ( size, Register :: from ( rs1) )
1541+ . build ( )
15471542 . with_source_operand ( LowLevelILOperandIndex ( 2 ) ) ;
15481543
15491544 if size < max_width {
1550- load_expr = il. sx ( max_width, load_expr) ;
1545+ load_expr = il. sx ( max_width, load_expr) . build ( ) ;
15511546 }
15521547
15531548 il. set_reg ( max_width, dest_reg, load_expr) . append ( ) ;
@@ -1576,6 +1571,7 @@ impl<D: RiscVDisassembler> Architecture for RiscVArch<D> {
15761571
15771572 let load_expr = il
15781573 . load ( m. width ( ) , il. add ( max_width, rs1, m. imm ( ) ) )
1574+ . build ( )
15791575 . with_source_operand ( LowLevelILOperandIndex ( 1 ) ) ;
15801576
15811577 il. set_reg ( m. width ( ) , rd, load_expr) . append ( ) ;
@@ -1587,6 +1583,7 @@ impl<D: RiscVDisassembler> Architecture for RiscVArch<D> {
15871583 let dest_expr = il. add ( max_width, rs1, m. imm ( ) ) ;
15881584
15891585 il. store ( m. width ( ) , dest_expr, il. reg ( m. width ( ) , rs2) )
1586+ . build ( )
15901587 . with_source_operand ( LowLevelILOperandIndex ( 1 ) )
15911588 . append ( ) ;
15921589 }
0 commit comments