mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
ubsan: m32c: left shift of negative value
cpu/ * m32c.cpu (f-dsp-64-s16): Mask before shifting signed value. opcodes/ * m32c-ibld.c: Regenerate.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2020-02-03 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* m32c.cpu (f-dsp-64-s16): Mask before shifting signed value.
|
||||
|
||||
2020-02-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* frv.cpu (f-u12): Multiply rather than left shift signed values.
|
||||
|
||||
@@ -781,12 +781,12 @@
|
||||
(df f-dsp-64-s16 " 16 bit signed" (all-isas) 64 16 INT
|
||||
((value pc) (ext INT
|
||||
(trunc HI
|
||||
(or (and (srl value 8) #x00ff)
|
||||
(and (sll value 8) #xff00))))) ; insert
|
||||
(or (and (srl value 8) #xff)
|
||||
(sll (and value #xff) 8))))) ; insert
|
||||
((value pc) (ext INT
|
||||
(trunc HI
|
||||
(or (and (srl value 8) #x00ff)
|
||||
(and (sll value 8) #xff00))))) ; extract
|
||||
(or (and (srl value 8) #xff)
|
||||
(sll (and value #xff) 8))))) ; extract
|
||||
)
|
||||
|
||||
;-------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user