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 memory operation builtins, ia64



On 18/04/2005, at 8:42 AM, Richard Henderson wrote:


On Sun, Apr 17, 2005 at 08:45:54PM -0700, Geoffrey Keating wrote:
Is this really supposed to be generating

(set (mem:BLK (mem:BLK (scratch))) ...)

Um... no?

I was wondering if you were doing something tricky. You have


[(set (mem:BLK (match_dup 0))

but then you write

operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (DImode));

which means that the (match_dup 0) gets substituted with (mem:BLK (scratch)) giving you two MEMs.

For PPC, I'm writing

(define_insn "memory_barrier"
  [(set (mem:BLK (match_scratch 0 "X"))
        (unspec:BLK [(mem:BLK (match_scratch 1 "X"))] UNSPEC_SYNC))]
  "TARGET_POWERPC"
  "sync")

which seems to be pretty effective, and saves a define_expand.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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