3333#include "symcat.h"
3434#include "fr30-desc.h"
3535#include "fr30-opc.h"
36+ #include "cgen/basic-modes.h"
3637#include "opintl.h"
3738#include "safe-ctype.h"
3839
@@ -604,7 +605,7 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
604605 case FR30_OPERAND_DIR10 :
605606 {
606607 long value = fields -> f_dir10 ;
607- value = ((unsigned int ) (value ) >> (2 ));
608+ value = ((USI ) (value ) >> (2 ));
608609 errmsg = insert_normal (cd , value , 0 , 0 , 8 , 8 , 16 , total_length , buffer );
609610 }
610611 break ;
@@ -614,14 +615,14 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
614615 case FR30_OPERAND_DIR9 :
615616 {
616617 long value = fields -> f_dir9 ;
617- value = ((unsigned int ) (value ) >> (1 ));
618+ value = ((USI ) (value ) >> (1 ));
618619 errmsg = insert_normal (cd , value , 0 , 0 , 8 , 8 , 16 , total_length , buffer );
619620 }
620621 break ;
621622 case FR30_OPERAND_DISP10 :
622623 {
623624 long value = fields -> f_disp10 ;
624- value = ((int ) (value ) >> (2 ));
625+ value = ((SI ) (value ) >> (2 ));
625626 errmsg = insert_normal (cd , value , 0 |(1 <<CGEN_IFLD_SIGNED ), 0 , 4 , 8 , 16 , total_length , buffer );
626627 }
627628 break ;
@@ -631,14 +632,14 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
631632 case FR30_OPERAND_DISP9 :
632633 {
633634 long value = fields -> f_disp9 ;
634- value = ((int ) (value ) >> (1 ));
635+ value = ((SI ) (value ) >> (1 ));
635636 errmsg = insert_normal (cd , value , 0 |(1 <<CGEN_IFLD_SIGNED ), 0 , 4 , 8 , 16 , total_length , buffer );
636637 }
637638 break ;
638639 case FR30_OPERAND_I20 :
639640 {
640641{
641- FLD (f_i20_4 ) = ((unsigned int ) (FLD (f_i20 )) >> (16 ));
642+ FLD (f_i20_4 ) = ((UINT ) (FLD (f_i20 )) >> (16 ));
642643 FLD (f_i20_16 ) = ((FLD (f_i20 )) & (65535 ));
643644}
644645 errmsg = insert_normal (cd , fields -> f_i20_4 , 0 , 0 , 8 , 4 , 16 , total_length , buffer );
@@ -658,14 +659,14 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
658659 case FR30_OPERAND_LABEL12 :
659660 {
660661 long value = fields -> f_rel12 ;
661- value = ((int ) (((value ) - (((pc ) + (2 ))))) >> (1 ));
662+ value = ((SI ) (((value ) - (((pc ) + (2 ))))) >> (1 ));
662663 errmsg = insert_normal (cd , value , 0 |(1 <<CGEN_IFLD_SIGNED )|(1 <<CGEN_IFLD_PCREL_ADDR ), 0 , 5 , 11 , 16 , total_length , buffer );
663664 }
664665 break ;
665666 case FR30_OPERAND_LABEL9 :
666667 {
667668 long value = fields -> f_rel9 ;
668- value = ((int ) (((value ) - (((pc ) + (2 ))))) >> (1 ));
669+ value = ((SI ) (((value ) - (((pc ) + (2 ))))) >> (1 ));
669670 errmsg = insert_normal (cd , value , 0 |(1 <<CGEN_IFLD_SIGNED )|(1 <<CGEN_IFLD_PCREL_ADDR ), 0 , 8 , 8 , 16 , total_length , buffer );
670671 }
671672 break ;
@@ -693,14 +694,14 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
693694 case FR30_OPERAND_S10 :
694695 {
695696 long value = fields -> f_s10 ;
696- value = ((int ) (value ) >> (2 ));
697+ value = ((SI ) (value ) >> (2 ));
697698 errmsg = insert_normal (cd , value , 0 |(1 <<CGEN_IFLD_SIGNED ), 0 , 8 , 8 , 16 , total_length , buffer );
698699 }
699700 break ;
700701 case FR30_OPERAND_U10 :
701702 {
702703 long value = fields -> f_u10 ;
703- value = ((unsigned int ) (value ) >> (2 ));
704+ value = ((USI ) (value ) >> (2 ));
704705 errmsg = insert_normal (cd , value , 0 , 0 , 8 , 8 , 16 , total_length , buffer );
705706 }
706707 break ;
@@ -716,7 +717,7 @@ fr30_cgen_insert_operand (CGEN_CPU_DESC cd,
716717 case FR30_OPERAND_UDISP6 :
717718 {
718719 long value = fields -> f_udisp6 ;
719- value = ((unsigned int ) (value ) >> (2 ));
720+ value = ((USI ) (value ) >> (2 ));
720721 errmsg = insert_normal (cd , value , 0 , 0 , 8 , 4 , 16 , total_length , buffer );
721722 }
722723 break ;
0 commit comments