mike@TURING.UNM.EDU (Michael I. Bushnell) (11/13/88)
More on the asm problem. I have tracked the error down. In stmt.c exactly three different kinds of RTL for asm statements can be generated (expand_asm_operands): If there is one output and no clobbers, we output (set OUTPUT (asm_operands INSN OUTPUTCONSTRAINT 0 ARGVEC CONSTRAINTS)) If there are no outputs and no inputs, we output (asm_operands INSN "" 0 ARGVEC CONSTRAINTS) Otherwise we assume there are multiple outputs and possible clobbers. We output (parallel [ (set OUTPUT0 (asm_operands INSN OUTPUTCONSTRAINT0 0 ARGVEC CONTSTRAINTS)) (set OUTPUT1 (asm_operands INSN OUTPUTCONSTRAINT1 1 ARGVEC CONTSTRAINTS)) . . (clobber (...)) (clobber (...)) . . ]) If there are no outputs and there are clobbers, then we end up using the last case, and outputting: (parallel [ (clobber (...)) (clobber (...)) . . ]) We end up with no asm_operands rtx's because there was one in the parallel for each output operand, and we have no output operands. I added code to produce (parallel [ (asm_operands INSN "" 0 ARGVEC CONSTRAINTS) (clobber (...)) (clobber (...)) . . ]) for this case, and ran into *many* problems. It seems virtually all of the remaining code that deals with asm_operands rtx's has the failing that it assumes that one of the first three patterns is actually present. I managed to find a few of these places, but I'm not up to scanning the whole compiler to find them all. For now, I will stick in a dummy output operand when I need clobbers. But it would be real nice to do this right. So, RMS...how 'bout it? --Mike Bushnell