mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
ubsan: xstormy16: left shift of negative value
cpu/ * xstormy16.cpu (f-rel12a): Avoid signed overflow. opcodes/ * xstormy16-ibld.c: Regenerate.
This commit is contained in:
parent
84e098cdea
commit
e6ced26afd
@ -1,3 +1,7 @@
|
||||
2019-12-16 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* xstormy16.cpu (f-rel12a): Avoid signed overflow.
|
||||
|
||||
2019-12-11 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* epiphany.cpu (f-sdisp11): Don't sign extend with shifts.
|
||||
|
@ -393,7 +393,7 @@
|
||||
(length 11)
|
||||
(mode INT)
|
||||
(encode (value pc) (sra SI (sub SI value (add SI pc 2)) 1))
|
||||
(decode (value pc) (add SI (sll value 1) (add SI pc 2)))
|
||||
(decode (value pc) (add SI (mul value 2) (add SI pc 2)))
|
||||
)
|
||||
(dnop rel12a "12 bit relative address" () h-uint f-rel12a)
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2019-12-16 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* xstormy16-ibld.c: Regenerate.
|
||||
|
||||
2019-12-16 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* score-dis.c (print_insn_score16): Move rpush/rpop imm field
|
||||
|
@ -800,7 +800,7 @@ xstormy16_cgen_extract_operand (CGEN_CPU_DESC cd,
|
||||
{
|
||||
long value;
|
||||
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 4, 11, 32, total_length, pc, & value);
|
||||
value = ((((value) << (1))) + (((pc) + (2))));
|
||||
value = ((((value) * (2))) + (((pc) + (2))));
|
||||
fields->f_rel12a = value;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user