]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xstormy16: Avoid accessing beyond the operands[] array
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 May 2025 09:01:26 +0000 (10:01 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 21 May 2025 09:01:26 +0000 (10:01 +0100)
The negsi2 C++ code writes to operands[2] even though the pattern
has no operand 2.

gcc/
* config/stormy16/stormy16.md (negsi2): Remove unused assignment.

gcc/config/stormy16/stormy16.md

index 70c82827a4ac84021aa02bb5aecc9b7052af93de..15c60ad038804138468dc756e52a57e8e71c944d 100644 (file)
   [(parallel [(set (match_operand:SI 0 "register_operand" "")
                   (neg:SI (match_operand:SI 1 "register_operand" "")))
              (clobber (reg:BI CARRY_REG))])]
-  ""
-  { operands[2] = gen_reg_rtx (HImode); })
+  "")
 
 (define_insn_and_split "*negsi2_internal"
   [(set (match_operand:SI 0 "register_operand" "=&r")