@@ -508,23 +508,23 @@ impl<D: RiscVDisassembler> architecture::Intrinsic for RiscVIntrinsic<D> {
508
508
}
509
509
}
510
510
511
- fn inputs ( & self ) -> Vec < NameAndType < String > > {
511
+ fn inputs ( & self ) -> Vec < Ref < NameAndType > > {
512
512
match self . id {
513
513
Intrinsic :: Uret | Intrinsic :: Sret | Intrinsic :: Mret | Intrinsic :: Wfi => {
514
514
vec ! [ ]
515
515
}
516
516
Intrinsic :: Csrrd => {
517
517
vec ! [ NameAndType :: new(
518
- "csr" . into ( ) ,
518
+ "csr" ,
519
519
& Type :: int( 4 , false ) ,
520
520
max_confidence( ) ,
521
521
) ]
522
522
}
523
523
Intrinsic :: Csrrw | Intrinsic :: Csrwr | Intrinsic :: Csrrs | Intrinsic :: Csrrc => {
524
524
vec ! [
525
- NameAndType :: new( "csr" . into ( ) , & Type :: int( 4 , false ) , max_confidence( ) ) ,
525
+ NameAndType :: new( "csr" , & Type :: int( 4 , false ) , max_confidence( ) ) ,
526
526
NameAndType :: new(
527
- "value" . into ( ) ,
527
+ "value" ,
528
528
& Type :: int( <D :: RegFile as RegFile >:: Int :: width( ) , false ) ,
529
529
min_confidence( ) ,
530
530
) ,
@@ -540,8 +540,8 @@ impl<D: RiscVDisassembler> architecture::Intrinsic for RiscVIntrinsic<D> {
540
540
| Intrinsic :: Fmin ( size)
541
541
| Intrinsic :: Fmax ( size) => {
542
542
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( ) ) ,
545
545
]
546
546
}
547
547
Intrinsic :: Fsqrt ( size, _)
@@ -550,28 +550,28 @@ impl<D: RiscVDisassembler> architecture::Intrinsic for RiscVIntrinsic<D> {
550
550
| Intrinsic :: FcvtFToI ( size, _, _)
551
551
| Intrinsic :: FcvtFToU ( size, _, _) => {
552
552
vec ! [ NameAndType :: new(
553
- "" . into ( ) ,
553
+ "" ,
554
554
& Type :: float( size as usize ) ,
555
555
max_confidence( ) ,
556
556
) ]
557
557
}
558
558
Intrinsic :: FcvtIToF ( size, _, _) => {
559
559
vec ! [ NameAndType :: new(
560
- "" . into ( ) ,
560
+ "" ,
561
561
& Type :: int( size as usize , true ) ,
562
562
max_confidence( ) ,
563
563
) ]
564
564
}
565
565
Intrinsic :: FcvtUToF ( size, _, _) => {
566
566
vec ! [ NameAndType :: new(
567
- "" . into ( ) ,
567
+ "" ,
568
568
& Type :: int( size as usize , false ) ,
569
569
max_confidence( ) ,
570
570
) ]
571
571
}
572
572
Intrinsic :: Fence => {
573
573
vec ! [ NameAndType :: new(
574
- "" . into ( ) ,
574
+ "" ,
575
575
& Type :: int( 4 , false ) ,
576
576
min_confidence( ) ,
577
577
) ]
@@ -2431,10 +2431,9 @@ impl<D: 'static + RiscVDisassembler + Send + Sync> RelocationHandler
2431
2431
. iter ( )
2432
2432
. find ( |r| r. info ( ) . native_type == Self :: R_RISCV_PCREL_HI20 )
2433
2433
{
2434
- Some ( target) => target,
2434
+ Some ( target) => target. target ( ) . wrapping_add ( target . info ( ) . addend as u64 ) ,
2435
2435
None => return false ,
2436
2436
} ;
2437
- let target = target. target ( ) . wrapping_add ( target. info ( ) . addend as u64 ) ;
2438
2437
2439
2438
let offset = target. wrapping_sub ( reloc. target ( ) ) as u32 ;
2440
2439
let low_offset = offset & 0xfff ;
0 commit comments