forked from Imagelibrary/binutils-gdb
sim: frv: fix cmpb uninitialized variable usage
This code sets up the cc variable based on the comparison of other registers, but it does so incrementally with bit operations, and it never initializes the cc variable. Initialize it to 0 which the cmpba insn is already doing.
This commit is contained in:
@@ -4266,6 +4266,7 @@
|
||||
"cmpb$pack $GRi,$GRj,$ICCi_1"
|
||||
(+ pack (GRk-null) OP_00 GRi ICCi_1 OPE2_0C GRj)
|
||||
(sequence ((QI cc))
|
||||
(set cc 0)
|
||||
(set-n cc (eq (and GRi #xff000000) (and GRj #xff000000)))
|
||||
(set-z cc (eq (and GRi #x00ff0000) (and GRj #x00ff0000)))
|
||||
(set-v cc (eq (and GRi #x0000ff00) (and GRj #x0000ff00)))
|
||||
|
||||
Reference in New Issue
Block a user