diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-25 20:52:46 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-26 15:28:22 +0930 |
commit | 0be2fe677c53c6d363a40ae3612d4490ba377e02 (patch) | |
tree | df15146097019c76042a73b056bee7d82af3b5b4 /gas/config | |
parent | 0919fa3c461ab524ee6ed2acf0a5b9f4a5c62de8 (diff) | |
download | gdb-0be2fe677c53c6d363a40ae3612d4490ba377e02.zip gdb-0be2fe677c53c6d363a40ae3612d4490ba377e02.tar.gz gdb-0be2fe677c53c6d363a40ae3612d4490ba377e02.tar.bz2 |
ubsan: opcodes/csky-opc.h:929 shift exponent 536870912
opcodes/
* csky-opc.h: Formatting.
(GENERAL_REG_BANK): Correct spelling. Update use throughout file.
(get_register_name): Mask arch with CSKY_ARCH_MASK for shift,
and shift 1u.
(get_register_number): Likewise.
* csky-dis.c (get_gr_name, get_cr_name): Don't mask mach_flag.
gas/
* config/tc-csky.c (parse_type_ctrlreg): Don't mask mach_flag
for csky_get_control_regno.
(csky_get_reg_val): Likewise when calling csky_get_general_regno.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-csky.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gas/config/tc-csky.c b/gas/config/tc-csky.c index 60d5aa1..569fe2b 100644 --- a/gas/config/tc-csky.c +++ b/gas/config/tc-csky.c @@ -2565,8 +2565,7 @@ parse_type_ctrlreg (char** oper) } else { - crx = csky_get_control_regno (mach_flag & CSKY_ARCH_MASK, - s, &s, &sel); + crx = csky_get_control_regno (mach_flag, s, &s, &sel); if (crx < 0) { SET_ERROR_STRING (ERROR_CREG_ILLEGAL, s); @@ -2577,8 +2576,7 @@ parse_type_ctrlreg (char** oper) } else if (i == -1) { - i = csky_get_control_regno (mach_flag & CSKY_ARCH_MASK, - s, &s, &sel); + i = csky_get_control_regno (mach_flag, s, &s, &sel); if (i < 0) { SET_ERROR_STRING (ERROR_CREG_ILLEGAL, s); @@ -2595,7 +2593,7 @@ csky_get_reg_val (char *str, int *len) { int regno = 0; char *s = str; - regno = csky_get_general_regno (mach_flag & CSKY_ARCH_MASK, str, &s); + regno = csky_get_general_regno (mach_flag, str, &s); *len = (s - str); return regno; } |