public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* commutative asm operands
@ 2002-07-31  9:45 Alan Modra
  2002-07-31 22:59 ` Richard Henderson
  2002-08-03 14:19 ` Roman Zippel
  0 siblings, 2 replies; 10+ messages in thread
From: Alan Modra @ 2002-07-31  9:45 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-08-06 17:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31  9:45 commutative asm operands Alan Modra
2002-07-31 22:59 ` Richard Henderson
2002-08-03 14:19 ` Roman Zippel
2002-08-03 19:45   ` Alan Modra
2002-08-04  9:29     ` Roman Zippel
2002-08-04 14:46       ` Alan Modra
2002-08-05 16:14         ` Roman Zippel
2002-08-05 16:38           ` Alan Modra
2002-08-06 16:17             ` Roman Zippel
2002-08-06 17:46               ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).