This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ia64.md weirdness (cmpxchg_acq_si)
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 16 Oct 2003 15:44:04 -0700
- Subject: ia64.md weirdness (cmpxchg_acq_si)
ia64.md has
(define_insn "cmpxchg_acq_si"
[(set (match_operand:SI 0 "gr_register_operand" "=r")
(match_dup 1))
(set (match_operand:SI 1 "not_postinc_memory_operand" "+S")
(unspec:SI [(match_dup 1)
(match_operand:SI 2 "gr_register_operand" "r")
(match_operand 3 "ar_ccv_reg_operand" "")]
UNSPEC_CMPXCHG_ACQ))]
which triggers a genrecog warning about operand 3 lacking a mode.
I tried to fix this by setting its mode first to SI and then to DI.
Neither works. With SI, all of ia64-sync-[123].c fail; the errors are
of the form
ia64-sync-1.c:29: error: unrecognizable insn:
(insn 14 13 16 0 (parallel [
(set (reg:SI 342)
(mem/v:SI (reg/f:SI 339) [0 S4 A32]))
(set (mem/v:SI (reg/f:SI 339) [0 S4 A32])
(unspec:SI [
(mem/v:SI (reg/f:SI 339) [0 S4 A32])
(reg:SI 341)
(reg:DI ar.ccv)
] 19))
]) -1 (nil)
(expr_list:REG_DEAD (reg:DI ar.ccv)
(expr_list:REG_DEAD (reg:SI 341)
(expr_list:REG_DEAD (reg/f:SI 339)
(expr_list:REG_UNUSED (reg:SI 342)
(nil))))))
With DI, only 1 and 2 fail; the failures are of the form
ia64-sync-2.c:56: error: unrecognizable insn:
(insn 107 106 108 15 (parallel [
(set (reg:SI 381)
(mem/v:SI (reg/f:DI 379) [0 S4 A32]))
(set (mem/v:SI (reg/f:DI 379) [0 S4 A32])
(unspec:SI [
(mem/v:SI (reg/f:DI 379) [0 S4 A32])
(reg:SI 381)
(reg:SI ar.ccv)
] 19))
]) -1 (nil)
(expr_list:REG_DEAD (reg:SI ar.ccv)
(nil)))
... I guess, to make genrecog happy, we'd need two copies of the
pattern, one with DImode ar.ccv and one with SImode?
ia64-sync-4.c fails right now irrespective of patches. The failures
are of the form
ia64-sync-4.c:12: internal compiler error: in copy_to_mode_reg,
at explow.c:675
I don't know what's up with that.
zw