diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-06-21 15:40:10 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-06-21 15:40:10 +0100 |
commit | 8f254cd4e40b692e5f01a3b40f2b5b60c8528a1e (patch) | |
tree | c9a3c4c620ef80442c0ede2c022c7c4a7ee48c28 /gcc/diagnostic-path.cc | |
parent | 4a43a06c7b2bcc3402ac69d6e5ce7b8008acc69a (diff) | |
download | gcc-8f254cd4e40b692e5f01a3b40f2b5b60c8528a1e.zip gcc-8f254cd4e40b692e5f01a3b40f2b5b60c8528a1e.tar.gz gcc-8f254cd4e40b692e5f01a3b40f2b5b60c8528a1e.tar.bz2 |
iq2000: Fix test and branch instructions
The iq2000 test and branch instructions had patterns like:
[(set (pc)
(if_then_else
(eq (and:SI (match_operand:SI 0 "register_operand" "r")
(match_operand:SI 1 "power_of_2_operand" "I"))
(const_int 0))
(match_operand 2 "pc_or_label_operand" "")
(match_operand 3 "pc_or_label_operand" "")))]
power_of_2_operand allows any 32-bit power of 2, whereas "I" only
accepts 16-bit signed constants. This meant that any power of 2
greater than 32768 would cause an "insn does not satisfy its
constraints" ICE.
Also, the %p operand modifier barfed on 1<<31, which is sign-
rather than zero-extended to 64 bits. The code is inherently
limited to 32-bit operands -- power_of_2_operand contains a test
involving "unsigned" -- so this patch just ands with 0xffffffff.
gcc/
* config/iq2000/iq2000.cc (iq2000_print_operand): Make %p handle 1<<31.
* config/iq2000/iq2000.md: Remove "I" constraints on
power_of_2_operands.
Diffstat (limited to 'gcc/diagnostic-path.cc')
0 files changed, 0 insertions, 0 deletions