@@ -45,6 +45,9 @@ type intrinsicBuilders map[intrinsicKey]intrinsicBuilder
45
45
46
46
// add adds the intrinsic builder b for pkg.fn for the given architecture.
47
47
func (ib intrinsicBuilders ) add (arch * sys.Arch , pkg , fn string , b intrinsicBuilder ) {
48
+ if _ , found := ib [intrinsicKey {arch , pkg , fn }]; found {
49
+ panic (fmt .Sprintf ("intrinsic already exists for %v.%v on %v" , pkg , fn , arch .Name ))
50
+ }
48
51
ib [intrinsicKey {arch , pkg , fn }] = b
49
52
}
50
53
@@ -239,7 +242,7 @@ func initIntrinsics(cfg *intrinsicBuildConfig) {
239
242
s .vars [memVar ] = s .newValue1 (ssa .OpSelect1 , types .TypeMem , v )
240
243
return s .newValue1 (ssa .OpSelect0 , types .Types [types .TUINT32 ], v )
241
244
},
242
- sys .PPC64 , sys . S390X )
245
+ sys .PPC64 )
243
246
addF ("internal/runtime/atomic" , "LoadAcq64" ,
244
247
func (s * state , n * ir.CallExpr , args []* ssa.Value ) * ssa.Value {
245
248
v := s .newValue2 (ssa .OpAtomicLoadAcq64 , types .NewTuple (types .Types [types .TUINT64 ], types .TypeMem ), args [0 ], s .mem ())
@@ -284,7 +287,7 @@ func initIntrinsics(cfg *intrinsicBuildConfig) {
284
287
s .vars [memVar ] = s .newValue3 (ssa .OpAtomicStoreRel32 , types .TypeMem , args [0 ], args [1 ], s .mem ())
285
288
return nil
286
289
},
287
- sys .PPC64 , sys . S390X )
290
+ sys .PPC64 )
288
291
addF ("internal/runtime/atomic" , "StoreRel64" ,
289
292
func (s * state , n * ir.CallExpr , args []* ssa.Value ) * ssa.Value {
290
293
s .vars [memVar ] = s .newValue3 (ssa .OpAtomicStoreRel64 , types .TypeMem , args [0 ], args [1 ], s .mem ())
0 commit comments