go-randomx/register.go
DataHoarder 432590f930
All checks were successful
continuous-integration/drone/push Build is passing
Move argon2 / float packages to their own folders, cleanup vm Run
2024-04-15 04:14:15 +02:00

36 lines
639 B
Go

package randomx
import (
"git.gammaspectra.live/P2Pool/go-randomx/v2/asm"
"git.gammaspectra.live/P2Pool/go-randomx/v2/softfloat"
)
const RegistersCount = 8
const RegistersCountFloat = 4
const LOW = 0
const HIGH = 1
type RegisterLine [RegistersCount]uint64
type RegisterFile struct {
R RegisterLine
F [RegistersCountFloat][2]float64
E [RegistersCountFloat][2]float64
A [RegistersCountFloat][2]float64
FPRC softfloat.RoundingMode
}
func (f *RegisterFile) SetRoundingMode(mode softfloat.RoundingMode) {
if f.FPRC == mode {
return
}
f.FPRC = mode
asm.SetRoundingMode(mode)
}
type MemoryRegisters struct {
mx, ma uint64
}