Browse Source

Revert "restore build constraint for reg.Move"

This reverts commit 9902ef3ba4.
pull/26/head
Andrea Barisani 6 months ago
parent
commit
26a880763f
  1. 14
      internal/reg/move.go
  2. 3
      internal/reg/reg32.go
  3. 2
      internal/reg/reg32.s

14
internal/reg/move.go

@ -1,14 +0,0 @@
// https://github.com/f-secure-foundry/tamago
//
// Copyright (c) F-Secure Corporation
// https://foundry.f-secure.com
//
// Use of this source code is governed by the license
// that can be found in the LICENSE file.
//
// +build tamago,arm
package reg
// defined in reg32.s
func Move(dst uint32, src uint32)

3
internal/reg/reg32.go

@ -64,6 +64,9 @@ func ClearN(addr uint32, pos int, mask int) {
atomic.StoreUint32(reg, r)
}
// defined in reg32.s
func Move(dst uint32, src uint32)
func Read(addr uint32) uint32 {
reg := (*uint32)(unsafe.Pointer(uintptr(addr)))
return atomic.LoadUint32(reg)

2
internal/reg/move.s → internal/reg/reg32.s

@ -6,8 +6,6 @@
// Use of this source code is governed by the license
// that can be found in the LICENSE file.
// +build tamago,arm
// func Move(dst uint32, src uint32)
TEXT ·Move(SB),$0-8
MOVW dst+0(FP), R0
Loading…
Cancel
Save