p.To.Sym = ir.Syms.Duffcopy
p.To.Offset = v.AuxInt
+ case ssa.OpRISCV64LoweredPubBarrier:
+ // FENCE
+ s.Prog(v.Op.Asm())
+
case ssa.OpRISCV64LoweredRound32F, ssa.OpRISCV64LoweredRound64F:
// input is already rounded
// Write barrier.
(WB ...) => (LoweredWB ...)
+// Publication barrier as intrinsic
+(PubBarrier ...) => (LoweredPubBarrier ...)
+
(PanicBounds [kind] x y mem) && boundsABI(kind) == 0 => (LoweredPanicBoundsA [kind] x y mem)
(PanicBounds [kind] x y mem) && boundsABI(kind) == 1 => (LoweredPanicBoundsB [kind] x y mem)
(PanicBounds [kind] x y mem) && boundsABI(kind) == 2 => (LoweredPanicBoundsC [kind] x y mem)
// Returns a pointer to a write barrier buffer in X24.
{name: "LoweredWB", argLength: 1, reg: regInfo{clobbers: (callerSave &^ (gpMask | regNamed["g"])) | regNamed["X1"], outputs: []regMask{regNamed["X24"]}}, clobberFlags: true, aux: "Int64"},
+ // Do data barrier. arg0=memorys
+ {name: "LoweredPubBarrier", argLength: 1, asm: "FENCE", hasSideEffects: true},
+
// There are three of these functions so that they can have three different register inputs.
// When we check 0 <= c <= cap (A), then 0 <= b <= c (B), then 0 <= a <= b (C), we want the
// default registers to match so we don't need to copy registers around unnecessarily.
OpRISCV64LoweredGetCallerSP
OpRISCV64LoweredGetCallerPC
OpRISCV64LoweredWB
+ OpRISCV64LoweredPubBarrier
OpRISCV64LoweredPanicBoundsA
OpRISCV64LoweredPanicBoundsB
OpRISCV64LoweredPanicBoundsC
},
},
},
+ {
+ name: "LoweredPubBarrier",
+ argLen: 1,
+ hasSideEffects: true,
+ asm: riscv.AFENCE,
+ reg: regInfo{},
+ },
{
name: "LoweredPanicBoundsA",
auxType: auxInt64,
return true
case OpPanicBounds:
return rewriteValueRISCV64_OpPanicBounds(v)
+ case OpPubBarrier:
+ v.Op = OpRISCV64LoweredPubBarrier
+ return true
case OpRISCV64ADD:
return rewriteValueRISCV64_OpRISCV64ADD(v)
case OpRISCV64ADDI:
s.vars[memVar] = s.newValue1(ssa.OpPubBarrier, types.TypeMem, s.mem())
return nil
},
- sys.ARM64, sys.PPC64)
+ sys.ARM64, sys.PPC64, sys.RISCV64)
brev_arch := []sys.ArchFamily{sys.AMD64, sys.I386, sys.ARM64, sys.ARM, sys.S390X}
if buildcfg.GOPPC64 >= 10 {