/* C-SKY disassembler.
- Copyright (C) 1988-2020 Free Software Foundation, Inc.
+ Copyright (C) 1988-2021 Free Software Foundation, Inc.
Contributed by C-SKY Microsystems and Mentor Graphics.
This file is part of the GNU opcodes library.
static const char *
get_gr_name (int regno)
{
- return csky_get_general_reg_name (mach_flag & CSKY_ABI_MASK, regno, using_abi);
+ return csky_get_general_reg_name (mach_flag, regno, using_abi);
}
/* Get control register name. */
static const char *
get_cr_name (unsigned int regno, int bank)
{
- return csky_get_control_reg_name (mach_flag & CSKY_ABI_MASK, bank, regno, using_abi);
+ return csky_get_control_reg_name (mach_flag, bank, regno, using_abi);
}
static int
strcat (str, buf);
ret = 0;
break;
+ case OPRND_TYPE_IMM5b_VSH:
+ {
+ char num[128];
+ value = ((value & 0x1) << 4) | (value >> 1);
+ sprintf (num, "%d", (int)value);
+ strcat (str, num);
+ ret = 0;
+ break;
+ }
case OPRND_TYPE_MSB2SIZE:
case OPRND_TYPE_LSB2SIZE:
{
else if ((value & 0x3) == 0x3)
strcat (str, "3");
break;
- case OPRND_TYPE_FREG_WITH_INDEX:
+ case OPRND_TYPE_VREG_WITH_INDEX:
{
unsigned freg_val = value & 0xf;
unsigned index_val = (value >> 4) & 0xf;
strcat(str, buf);
break;
}
+ case OPRND_TYPE_FREG_WITH_INDEX:
+ {
+ unsigned freg_val = value & 0xf;
+ unsigned index_val = (value >> 4) & 0xf;
+ sprintf (buf, "fr%d[%d]", freg_val, index_val);
+ strcat(str, buf);
+ break;
+ }
case OPRND_TYPE_REGr4_r7:
if (IS_CSKY_V1 (mach_flag))
- sprintf (buf, "%s-%s", get_gr_name (4), get_gr_name (7));
- strcat (str, buf);
+ {
+ sprintf (buf, "%s-%s", get_gr_name (4), get_gr_name (7));
+ strcat (str, buf);
+ }
break;
case OPRND_TYPE_CONST1:
strcat (str, "1");