This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: atomic ops for powerpc


On Fri, Apr 22, 2005 at 01:36:37PM -0700, Geoff Keating wrote:
> One can do nearly anything in engineering, but this particular thing  
> is not a good idea.  Labels have alignment, they affect the basic- 
> block graph, they're deleted if they're not used, and so on.

It's not unknown to generate labels at assembly output time, and
they can't be deleted there, since they're never output to the
rtl insn stream.  For example,

(define_insn "*conditional_trap_1"
  [(trap_if (match_operator 0 "comparison_operator"
             [(reg FLAGS_REG) (const_int 0)])
            (match_operand 1 "const_int_operand" ""))]
  ""
{
  operands[2] = gen_label_rtx ();
  output_asm_insn ("j%c0\t%l2\; int\t%1", operands);
  (*targetm.asm_out.internal_label) (asm_out_file, "L",
                             CODE_LABEL_NUMBER (operands[2]));
  RET;
})



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]