This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
commutative asm operands
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 31 Jul 2002 23:44:25 +0930
- Subject: commutative asm operands
I was forwarded a testcase today containing some horrible asm
asm ("addc %0, %2, %3\n\t"
"adde %1, %4, %5"
: "=r" (lo), "=r" (hi)
: "%r" (__lo), "0" (lo), "%r" (__hi), "1" (hi))
Note the use of "%" with "0"/"1" in the next operand. Is this legal?
If so, recog.c:constrain_operands needs to be taught to handle this
case.
Led to an ICE on powerpc64 gcc-3.1.1
unrecognizable insn:
(insn 1181 5394 1182 (parallel[
(set (reg:SI 0 r0 [742])
(asm_operands:SI ("addc %0, %2, %3
adde %1, %4, %5") ("=r") 0[
(reg:SI 0 r0 [737])
(reg:SI 30 r30 [134])
(reg:SI 31 r31 [133])
(reg:SI 9 r9 [743])
]
[
(asm_input:SI ("%r"))
(asm_input:SI ("0"))
(asm_input:SI ("%r"))
(asm_input:SI ("1"))
] ("layer3.c") 1698))
(set (reg:SI 9 r9 [743])
(asm_operands:SI ("addc %0, %2, %3
adde %1, %4, %5") ("=r") 1[
(reg:SI 0 r0 [737])
(reg:SI 30 r30 [134])
(reg:SI 31 r31 [133])
(reg:SI 9 r9 [743])
]
[
(asm_input:SI ("%r"))
(asm_input:SI ("0"))
(asm_input:SI ("%r"))
(asm_input:SI ("1"))
] ("layer3.c") 1698))
] ) -1 (insn_list 1179 (insn_list 1180 (insn_list 1168 (insn_list 1169 (nil)))))
(nil))
Internal compiler error in reload_cse_simplify_operands, at reload1.c:8369
--
Alan Modra
IBM OzLabs - Linux Technology Centre