central-arch/pkg/cpu/instr.go
2024-11-01 11:54:59 +01:00

27 lines
519 B
Go

package cpu
import (
"log"
"git.elyanpoujol.fr/elyan/central-arch/pkg/instr"
)
const instrMask = 0x7f
func (cpu *Cpu) RegisterInstr(instrDesc instr.InstrDesc) {
// TODO Implement it
log.Printf("Registered: %+v\n", instrDesc)
}
func (cpu *Cpu) GetOpCode(i instr.Instr) uint32 {
return uint32(i & instrMask)
}
func (cpu *Cpu) GetFormat(i instr.Instr) instr.InstrFormat {
panic("Not implemented yet")
}
func (cpu *Cpu) Decode(i instr.Instr, decodedInstr *instr.DecodedInstr) {
panic("Not implemented yet")
}