mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
PR26497 UBSAN: tc-sh.c:2467 left shift cannot be represented
PR 26497 * config/tc-sh.c (assemble_ppi): Use unsigned variables.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2020-08-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR 26497
|
||||||
|
* config/tc-sh.c (assemble_ppi): Use unsigned variables.
|
||||||
|
|
||||||
2020-08-31 Alan Modra <amodra@gmail.com>
|
2020-08-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 26495
|
PR 26495
|
||||||
|
@ -2205,12 +2205,12 @@ find_cooked_opcode (char **str_p)
|
|||||||
static unsigned int
|
static unsigned int
|
||||||
assemble_ppi (char *op_end, sh_opcode_info *opcode)
|
assemble_ppi (char *op_end, sh_opcode_info *opcode)
|
||||||
{
|
{
|
||||||
int movx = 0;
|
unsigned int movx = 0;
|
||||||
int movy = 0;
|
unsigned int movy = 0;
|
||||||
int cond = 0;
|
unsigned int cond = 0;
|
||||||
int field_b = 0;
|
unsigned int field_b = 0;
|
||||||
char *output;
|
char *output;
|
||||||
int move_code;
|
unsigned int move_code;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -2464,7 +2464,7 @@ assemble_ppi (char *op_end, sh_opcode_info *opcode)
|
|||||||
if (field_b)
|
if (field_b)
|
||||||
{
|
{
|
||||||
/* Parallel processing insn. */
|
/* Parallel processing insn. */
|
||||||
unsigned long ppi_code = (movx | movy | 0xf800) << 16 | field_b;
|
unsigned int ppi_code = (movx | movy | 0xf800) << 16 | field_b;
|
||||||
|
|
||||||
output = frag_more (4);
|
output = frag_more (4);
|
||||||
size = 4;
|
size = 4;
|
||||||
|
Reference in New Issue
Block a user