Versions in this module Expand all Collapse all v3 v3.1.0 Apr 23, 2024 Changes in this version + func GetFlags() (flags uint64) type Dataset + func NewDataset(cache *Cache) Dataset v3.0.0 Apr 23, 2024 Changes in this version + const ArgonSaltSize + const CONDITIONMASK + const CONDITIONOFFSET + const CYCLE_MAP_SIZE + const CacheLineAlignMask + const CacheLineSize + const CacheSize + const CodeAlign — darwin/amd64, linux/amd64 + const DatasetExtraItems + const DatasetItemCount + const DatasetSize + const HIGH + const LOOK_FORWARD_CYCLES + const LOW + const MAX_THROWAWAY_COUNT + const Mask + const MaxRandomXInstrCodeSize — darwin/amd64, linux/amd64 + const MaxSuperscalarInstrSize — darwin/amd64, linux/amd64 + const Null + const P0 + const P01 + const P015 + const P05 + const P1 + const P5 + const RANDOMX_ARGON_ITERATIONS + const RANDOMX_ARGON_LANES + const RANDOMX_ARGON_MEMORY + const RANDOMX_ARGON_SALT + const RANDOMX_CACHE_ACCESSES + const RANDOMX_DATASET_BASE_SIZE + const RANDOMX_DATASET_EXTRA_SIZE + const RANDOMX_DATASET_ITEM_SIZE + const RANDOMX_FLAG_ARGON2 + const RANDOMX_FLAG_ARGON2_AVX2 + const RANDOMX_FLAG_ARGON2_SSSE3 + const RANDOMX_FLAG_DEFAULT + const RANDOMX_FLAG_FULL_MEM + const RANDOMX_FLAG_HARD_AES + const RANDOMX_FLAG_JIT + const RANDOMX_FLAG_LARGE_PAGES + const RANDOMX_FLAG_SECURE + const RANDOMX_JUMP_BITS + const RANDOMX_JUMP_OFFSET + const RANDOMX_PROGRAM_COUNT + const RANDOMX_PROGRAM_ITERATIONS + const RANDOMX_PROGRAM_SIZE + const RANDOMX_SCRATCHPAD_L1 + const RANDOMX_SCRATCHPAD_L2 + const RANDOMX_SCRATCHPAD_L3 + const RANDOMX_SUPERSCALAR_LATENCY + const RegisterFileSize + const RegisterNeedsDisplacement + const RegisterNeedsSib + const RegistersCount + const RegistersCountFloat + const ReserveCodeSize — darwin/amd64, linux/amd64 + const STOREL3CONDITION + const S_IADD_C7 + const S_IADD_C8 + const S_IADD_C9 + const S_IADD_RS + const S_IMULH_R + const S_IMUL_R + const S_IMUL_RCP + const S_INVALID + const S_IROR_C + const S_ISMULH_R + const S_ISUB_R + const S_IXOR_C7 + const S_IXOR_C8 + const S_IXOR_C9 + const S_IXOR_R + const S_NOP + const ScratchpadL1 + const ScratchpadL1Mask + const ScratchpadL1Mask16 + const ScratchpadL2 + const ScratchpadL2Mask + const ScratchpadL2Mask16 + const ScratchpadL3 + const ScratchpadL3Mask + const ScratchpadL3Mask64 + const ScratchpadSize + const SuperscalarMaxSize + const SuperscalarProgramHeader — darwin/amd64, linux/amd64 + const VM_CBRANCH + const VM_CFROUND + const VM_FADD_M + const VM_FADD_R + const VM_FDIV_M + const VM_FMUL_R + const VM_FSCAL_R + const VM_FSQRT_R + const VM_FSUB_M + const VM_FSUB_R + const VM_FSWAP_RE + const VM_FSWAP_RF + const VM_IADD_M + const VM_IADD_MZ + const VM_IADD_RS + const VM_IMULH_M + const VM_IMULH_MZ + const VM_IMULH_R + const VM_IMUL_I + const VM_IMUL_M + const VM_IMUL_MZ + const VM_IMUL_R + const VM_INEG_R + const VM_IROL_I + const VM_IROL_R + const VM_IROR_I + const VM_IROR_R + const VM_ISMULH_M + const VM_ISMULH_MZ + const VM_ISMULH_R + const VM_ISTORE + const VM_ISUB_I + const VM_ISUB_M + const VM_ISUB_MZ + const VM_ISUB_R + const VM_ISWAP_R + const VM_IXOR_I + const VM_IXOR_M + const VM_IXOR_MZ + const VM_IXOR_R + const VM_NOP + var ADD_EBX_I = []byte — darwin/amd64, linux/amd64 + var ADD_RAX_RCX = []byte — darwin/amd64, linux/amd64 + var ADD_RDX_R = []byte — darwin/amd64, linux/amd64 + var ADD_R_RAX = []byte — darwin/amd64, linux/amd64 + var AND_EAX_I byte = 0x25 — darwin/amd64, linux/amd64 + var AND_ECX_I = []byte — darwin/amd64, linux/amd64 + var AND_OR_MOV_LDMXCSR = []byte — darwin/amd64, linux/amd64 + var BranchesWithin32B = func() bool { ... }() — darwin/amd64, linux/amd64 + var CALL = 0xe8 — darwin/amd64, linux/amd64 + var CodeSize = uint32(RandomXCodeSize + SuperscalarSize) — darwin/amd64, linux/amd64 + var IADD_C7 = Instruction + var IADD_C8 = Instruction + var IADD_C9 = Instruction + var IADD_RS = Instruction + var IMULH_R = Instruction + var IMUL_R = Instruction + var IMUL_RCP = Instruction + var IROR_C = Instruction + var ISMULH_R = Instruction + var ISUB_R = Instruction + var IXOR_C7 = Instruction + var IXOR_C8 = Instruction + var IXOR_C9 = Instruction + var IXOR_R = Instruction + var JMP byte = 0xe9 — darwin/amd64, linux/amd64 + var JMP_ALIGN_PREFIX = [14][]byte — darwin/amd64, linux/amd64 + var JNZ = []byte — darwin/amd64, linux/amd64 + var JZ = []byte — darwin/amd64, linux/amd64 + var JZ_SHORT byte = 0x74 — darwin/amd64, linux/amd64 + var LEA_32 = []byte — darwin/amd64, linux/amd64 + var MOVAPD = []byte — darwin/amd64, linux/amd64 + var MOVNTI = []byte — darwin/amd64, linux/amd64 + var MOV_EAX_I byte = 0xb8 — darwin/amd64, linux/amd64 + var MOV_RAX_I = []byte — darwin/amd64, linux/amd64 + var MOV_RCX_I = []byte — darwin/amd64, linux/amd64 + var MOV_RCX_RAX_SAR_RCX_63 = []byte — darwin/amd64, linux/amd64 + var MUL_RCX = []byte — darwin/amd64, linux/amd64 + var M_Add_ri = MacroOP + var M_Add_rr = MacroOP + var M_Imul_r = MacroOP + var M_Imul_r_dependent = MacroOP + var M_Imul_rr = MacroOP + var M_Lea_SIB = MacroOP + var M_Mov_ri64 = MacroOP + var M_Mov_rr = MacroOP + var M_Mul_r = MacroOP + var M_Ror_ri = MacroOP + var M_Sub_rr = MacroOP + var M_Xor_ri = MacroOP + var M_Xor_rr = MacroOP + var NEG_RAX = []byte — darwin/amd64, linux/amd64 + var NOP1 = []byte — darwin/amd64, linux/amd64 + var NOP2 = []byte — darwin/amd64, linux/amd64 + var NOP3 = []byte — darwin/amd64, linux/amd64 + var NOP4 = []byte — darwin/amd64, linux/amd64 + var NOP5 = []byte — darwin/amd64, linux/amd64 + var NOP6 = []byte — darwin/amd64, linux/amd64 + var NOP7 = []byte — darwin/amd64, linux/amd64 + var NOP8 = []byte — darwin/amd64, linux/amd64 + var NOPX = [][]byte — darwin/amd64, linux/amd64 + var PADD_OPCODES = []byte — darwin/amd64, linux/amd64 + var RAX_ADD_SBB_1 = []byte — darwin/amd64, linux/amd64 + var RET byte = 0xc3 — darwin/amd64, linux/amd64 + var REX_81 = []byte — darwin/amd64, linux/amd64 + var REX_ADDPD = []byte — darwin/amd64, linux/amd64 + var REX_ADD_I = []byte — darwin/amd64, linux/amd64 + var REX_ADD_RM = []byte — darwin/amd64, linux/amd64 + var REX_ADD_RR = []byte — darwin/amd64, linux/amd64 + var REX_ANDPS_XMM12 = []byte — darwin/amd64, linux/amd64 + var REX_CMP_M32I = []byte — darwin/amd64, linux/amd64 + var REX_CMP_R32I = []byte — darwin/amd64, linux/amd64 + var REX_CVTDQ2PD_XMM12 = []byte — darwin/amd64, linux/amd64 + var REX_DIVPD = []byte — darwin/amd64, linux/amd64 + var REX_IMUL_MEM = []byte — darwin/amd64, linux/amd64 + var REX_IMUL_RM = []byte — darwin/amd64, linux/amd64 + var REX_IMUL_RR = []byte — darwin/amd64, linux/amd64 + var REX_IMUL_RRI = []byte — darwin/amd64, linux/amd64 + var REX_LEA = []byte — darwin/amd64, linux/amd64 + var REX_MAXPD = []byte — darwin/amd64, linux/amd64 + var REX_MOV_MR = []byte — darwin/amd64, linux/amd64 + var REX_MOV_R64R = []byte — darwin/amd64, linux/amd64 + var REX_MOV_RR = []byte — darwin/amd64, linux/amd64 + var REX_MOV_RR64 = []byte — darwin/amd64, linux/amd64 + var REX_MULPD = []byte — darwin/amd64, linux/amd64 + var REX_MUL_M = []byte — darwin/amd64, linux/amd64 + var REX_MUL_MEM = []byte — darwin/amd64, linux/amd64 + var REX_MUL_R = []byte — darwin/amd64, linux/amd64 + var REX_NEG = []byte — darwin/amd64, linux/amd64 + var REX_PADD = []byte — darwin/amd64, linux/amd64 + var REX_ROT_CL = []byte — darwin/amd64, linux/amd64 + var REX_ROT_I8 = []byte — darwin/amd64, linux/amd64 + var REX_SH = []byte — darwin/amd64, linux/amd64 + var REX_SHR_RAX = []byte — darwin/amd64, linux/amd64 + var REX_SHR_RDX = []byte — darwin/amd64, linux/amd64 + var REX_SUBPD = []byte — darwin/amd64, linux/amd64 + var REX_SUB_RM = []byte — darwin/amd64, linux/amd64 + var REX_SUB_RR = []byte — darwin/amd64, linux/amd64 + var REX_TEST = []byte — darwin/amd64, linux/amd64 + var REX_XCHG = []byte — darwin/amd64, linux/amd64 + var REX_XORPS = []byte — darwin/amd64, linux/amd64 + var REX_XOR_EAX = []byte — darwin/amd64, linux/amd64 + var REX_XOR_RAX_R64 = []byte — darwin/amd64, linux/amd64 + var REX_XOR_RI = []byte — darwin/amd64, linux/amd64 + var REX_XOR_RM = []byte — darwin/amd64, linux/amd64 + var REX_XOR_RR = []byte — darwin/amd64, linux/amd64 + var ROL_RAX = []byte — darwin/amd64, linux/amd64 + var RandomXCodeSize = alignSize[uint64](ReserveCodeSize + MaxRandomXInstrCodeSize*RANDOMX_PROGRAM_SIZE, CodeAlign) — darwin/amd64, linux/amd64 + var RandomXCodeSize uint64 = 0 — js/wasm, windows/amd64 + var SAR_RAX_I8 = []byte — darwin/amd64, linux/amd64 + var SAR_RDX_I8 = []byte — darwin/amd64, linux/amd64 + var SETS_AL_ADD_RDX_RAX = []byte — darwin/amd64, linux/amd64 + var SHUFPD = []byte — darwin/amd64, linux/amd64 + var SQRTPD = []byte — darwin/amd64, linux/amd64 + var SUB_EBX = []byte — darwin/amd64, linux/amd64 + var SUB_RDX_R = []byte — darwin/amd64, linux/amd64 + var SuperscalarSize = alignSize[uint64](...) — darwin/amd64, linux/amd64 + var TEST_RDX_RDX = []byte — darwin/amd64, linux/amd64 + var XOR_EAX_EAX = []byte — darwin/amd64, linux/amd64 + var XOR_ECX_ECX = []byte — darwin/amd64, linux/amd64 + func CompileProgramToByteCode(prog []byte, bc *ByteCode) + func CreateSuperScalarInstruction(sins *SuperScalarInstruction, gen *blake2.Generator, instructionLen int, ...) + func ExponentMask(entropy uint64) uint64 + func InitDatasetParallel(dataset Dataset, n int) + func MaskRegisterExponentMantissa(f float64, mode uint64) float64 + func ScaleNegate(f float64) float64 + func ScheduleMop(mop *MacroOP, portbusy [][]int, cycle int, depcycle int, commit bool) int + func ScheduleUop(uop ExecutionPort, portbusy [][]int, cycle int, commit bool) int + func SetRoundingMode(f *RegisterFile, mode uint8) + func SmallPositiveFloatBits(entropy uint64) float64 + func StaticExponent(entropy uint64) uint64 + func Xor(a, b float64) float64 + type ByteCode [RANDOMX_PROGRAM_SIZE]ByteCodeInstruction + func (c *ByteCode) Execute(f *RegisterFile, pad *ScratchPad, eMask [2]uint64) + type ByteCodeInstruction struct + Dst byte + EMask uint64 + Imm uint64 + ImmB uint8 + MemMask uint32 + Opcode ByteCodeInstructionOp + Src byte + type ByteCodeInstructionOp int + type Cache struct + Blocks []MemoryBlock + Flags uint64 + JitPrograms [RANDOMX_PROGRAM_COUNT]SuperScalarProgramFunc + Programs [RANDOMX_PROGRAM_COUNT]SuperScalarProgram + func NewCache(flags uint64) *Cache + func (cache *Cache) Close() error + func (cache *Cache) GetMixBlock(addr uint64) *RegisterLine + func (cache *Cache) HasJIT() bool + func (cache *Cache) Init(key []byte) + func (cache *Cache) InitDataset(dataset []RegisterLine, startItem, endItem uint64) + func (cache *Cache) InitDatasetItem(rl *RegisterLine, itemNumber uint64) + func (cache *Cache) InitDatasetItemJIT(rl *RegisterLine, itemNumber uint64) + type Dataset interface + Cache func() *Cache + Flags func() uint64 + InitDataset func(startItem, itemCount uint64) + Memory func() []RegisterLine + PrefetchDataset func(address uint64) + ReadDataset func(address uint64, r *RegisterLine) + type DatasetFull struct + func NewFullDataset(cache *Cache) *DatasetFull + func (d *DatasetFull) Cache() *Cache + func (d *DatasetFull) Flags() uint64 + func (d *DatasetFull) InitDataset(startItem, itemCount uint64) + func (d *DatasetFull) Memory() []RegisterLine + func (d *DatasetFull) PrefetchDataset(address uint64) + func (d *DatasetFull) ReadDataset(address uint64, r *RegisterLine) + type DatasetLight struct + func NewLightDataset(cache *Cache) *DatasetLight + func (d *DatasetLight) Cache() *Cache + func (d *DatasetLight) Flags() uint64 + func (d *DatasetLight) InitDataset(startItem, itemCount uint64) + func (d *DatasetLight) Memory() []RegisterLine + func (d *DatasetLight) PrefetchDataset(address uint64) + func (d *DatasetLight) ReadDataset(address uint64, r *RegisterLine) + type DecoderType int + const Decoder3310 + const Decoder3733 + const Decoder4444 + const Decoder484 + const Decoder493 + const Decoder7333 + func FetchNextDecoder(ins *Instruction, cycle int, mulcount int, gen *blake2.Generator) DecoderType + func (d DecoderType) GetSize() int + func (d DecoderType) String() string + type ExecutionPort byte + type Instruction struct + DstOP int + Opcode byte + ResultOP int + SrcOP int + UOP MacroOP + UOP_Array []MacroOP + func (ins *Instruction) GetLatency() int + func (ins *Instruction) GetSize() int + func (ins *Instruction) GetUOPCount() int + func (ins *Instruction) IsSimple() bool + type MacroOP struct + Dependent bool + Latency int + Name string + Size int + UOP1 ExecutionPort + UOP2 ExecutionPort + func (m *MacroOP) GetLatency() int + func (m *MacroOP) GetSize() int + func (m *MacroOP) GetUOP1() ExecutionPort + func (m *MacroOP) GetUOP2() ExecutionPort + func (m *MacroOP) IsDependent() bool + func (m *MacroOP) IsEliminated() bool + func (m *MacroOP) IsSimple() bool + type MemoryBlock [128]uint64 + func (m *MemoryBlock) GetLine(addr uint64) *RegisterLine + type REG struct + Hi uint64 + Lo uint64 + type Register struct + LastOpGroup int + LastOpPar int + Latency int + Status int + Value uint64 + type RegisterFile struct + A [RegistersCountFloat][2]float64 + E [RegistersCountFloat][2]float64 + F [RegistersCountFloat][2]float64 + FPRC uint8 + R RegisterLine + func (rf *RegisterFile) Memory() *[RegisterFileSize]byte + type RegisterLine [RegistersCount]uint64 + type ScratchPad [ScratchpadSize]byte + func (pad *ScratchPad) Init(seed *[64]byte) + func (pad *ScratchPad) Load32(addr uint32) uint32 + func (pad *ScratchPad) Load32F(addr uint32) (lo, hi float64) + func (pad *ScratchPad) Load32FA(addr uint32) [2]float64 + func (pad *ScratchPad) Load64(addr uint32) uint64 + func (pad *ScratchPad) Store64(addr uint32, val uint64) + type SuperScalarInstruction struct + CanReuse bool + Dst int + GroupParIsSource int + Imm32 uint32 + Imm64 uint64 + Mod byte + OpGroup int + OpGroupPar int + Opcode byte + Src int + func (sins *SuperScalarInstruction) FixSrcReg() + func (sins *SuperScalarInstruction) Reset() + func (sins *SuperScalarInstruction) SelectDestination(cycle int, allowChainedMul bool, Registers *[8]Register, gen *blake2.Generator) bool + func (sins *SuperScalarInstruction) SelectSource(cycle int, registers *[8]Register, gen *blake2.Generator) bool + type SuperScalarProgram []SuperScalarInstruction + func BuildSuperScalarProgram(gen *blake2.Generator) SuperScalarProgram + func (p SuperScalarProgram) AddressRegister() int + func (p SuperScalarProgram) Program() []SuperScalarInstruction + type SuperScalarProgramFunc []byte + func (f SuperScalarProgramFunc) Close() error + func (f SuperScalarProgramFunc) Execute(rf uintptr) + type VM struct + Dataset Dataset + ScratchPad ScratchPad + func NewVM(dataset Dataset) *VM + func (vm *VM) CalculateHash(input []byte, output *[32]byte) + func (vm *VM) Close() error + type VMProgramFunc []byte + func (f VMProgramFunc) Close() error + func (f VMProgramFunc) Execute(rf *RegisterFile, pad *ScratchPad, eMask [2]uint64) + func (f VMProgramFunc) ExecuteFull(rf *RegisterFile, pad *ScratchPad, dataset *RegisterLine, iterations uint64, ...) + type VM_Instruction [8]byte + func (ins VM_Instruction) Dst() byte + func (ins VM_Instruction) IMM() uint32 + func (ins VM_Instruction) IMM64() uint64 + func (ins VM_Instruction) Mod() byte + func (ins VM_Instruction) Opcode() byte + func (ins VM_Instruction) Src() byte Other modules containing this package git.gammaspectra.live/P2Pool/go-randomx git.gammaspectra.live/P2Pool/go-randomx/v2