@@ -508,23 +508,23 @@ impl<D: RiscVDisassembler> architecture::Intrinsic for RiscVIntrinsic<D> {
508508 }
509509 }
510510
511- fn inputs ( & self ) -> Vec < NameAndType < String > > {
511+ fn inputs ( & self ) -> Vec < Ref < NameAndType > > {
512512 match self . id {
513513 Intrinsic :: Uret | Intrinsic :: Sret | Intrinsic :: Mret | Intrinsic :: Wfi => {
514514 vec ! [ ]
515515 }
516516 Intrinsic :: Csrrd => {
517517 vec ! [ NameAndType :: new(
518- "csr" . into ( ) ,
518+ "csr" ,
519519 & Type :: int( 4 , false ) ,
520520 max_confidence( ) ,
521521 ) ]
522522 }
523523 Intrinsic :: Csrrw | Intrinsic :: Csrwr | Intrinsic :: Csrrs | Intrinsic :: Csrrc => {
524524 vec ! [
525- NameAndType :: new( "csr" . into ( ) , & Type :: int( 4 , false ) , max_confidence( ) ) ,
525+ NameAndType :: new( "csr" , & Type :: int( 4 , false ) , max_confidence( ) ) ,
526526 NameAndType :: new(
527- "value" . into ( ) ,
527+ "value" ,
528528 & Type :: int( <D :: RegFile as RegFile >:: Int :: width( ) , false ) ,
529529 min_confidence( ) ,
530530 ) ,
@@ -540,8 +540,8 @@ impl<D: RiscVDisassembler> architecture::Intrinsic for RiscVIntrinsic<D> {
540540 | Intrinsic :: Fmin ( size)
541541 | Intrinsic :: Fmax ( size) => {
542542 vec ! [
543- NameAndType :: new( "" . into ( ) , & Type :: float( size as usize ) , max_confidence( ) ) ,
544- NameAndType :: new( "" . into ( ) , & Type :: float( size as usize ) , max_confidence( ) ) ,
543+ NameAndType :: new( "" , & Type :: float( size as usize ) , max_confidence( ) ) ,
544+ NameAndType :: new( "" , & Type :: float( size as usize ) , max_confidence( ) ) ,
545545 ]
546546 }
547547 Intrinsic :: Fsqrt ( size, _)
@@ -550,28 +550,28 @@ impl<D: RiscVDisassembler> architecture::Intrinsic for RiscVIntrinsic<D> {
550550 | Intrinsic :: FcvtFToI ( size, _, _)
551551 | Intrinsic :: FcvtFToU ( size, _, _) => {
552552 vec ! [ NameAndType :: new(
553- "" . into ( ) ,
553+ "" ,
554554 & Type :: float( size as usize ) ,
555555 max_confidence( ) ,
556556 ) ]
557557 }
558558 Intrinsic :: FcvtIToF ( size, _, _) => {
559559 vec ! [ NameAndType :: new(
560- "" . into ( ) ,
560+ "" ,
561561 & Type :: int( size as usize , true ) ,
562562 max_confidence( ) ,
563563 ) ]
564564 }
565565 Intrinsic :: FcvtUToF ( size, _, _) => {
566566 vec ! [ NameAndType :: new(
567- "" . into ( ) ,
567+ "" ,
568568 & Type :: int( size as usize , false ) ,
569569 max_confidence( ) ,
570570 ) ]
571571 }
572572 Intrinsic :: Fence => {
573573 vec ! [ NameAndType :: new(
574- "" . into ( ) ,
574+ "" ,
575575 & Type :: int( 4 , false ) ,
576576 min_confidence( ) ,
577577 ) ]
@@ -2431,10 +2431,9 @@ impl<D: 'static + RiscVDisassembler + Send + Sync> RelocationHandler
24312431 . iter ( )
24322432 . find ( |r| r. info ( ) . native_type == Self :: R_RISCV_PCREL_HI20 )
24332433 {
2434- Some ( target) => target,
2434+ Some ( target) => target. target ( ) . wrapping_add ( target . info ( ) . addend as u64 ) ,
24352435 None => return false ,
24362436 } ;
2437- let target = target. target ( ) . wrapping_add ( target. info ( ) . addend as u64 ) ;
24382437
24392438 let offset = target. wrapping_sub ( reloc. target ( ) ) as u32 ;
24402439 let low_offset = offset & 0xfff ;
0 commit comments