Removed unnecessary list of registers

This commit is contained in:
Eduard Urbach 2025-03-05 14:41:58 +01:00
parent bfa8f9c7c4
commit cc1c990dc8
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 3 additions and 4 deletions

View file

@ -24,12 +24,12 @@ func NewFunction(pkg string, name string, file *fs.File) *Function {
Scopes: []*scope.Scope{{}},
},
CPU: cpu.CPU{
All: x86.AllRegisters,
General: x86.GeneralRegisters,
Input: x86.InputRegisters,
Output: x86.OutputRegisters,
SyscallInput: x86.SyscallInputRegisters,
SyscallOutput: x86.SyscallOutputRegisters,
NumRegisters: 16,
},
},
}

View file

@ -44,7 +44,7 @@ func (f *Function) PrintInstructions() {
registers := bytes.Buffer{}
used := f.RegisterHistory[i]
for _, reg := range f.CPU.All {
for reg := range f.CPU.NumRegisters {
if used&(1<<reg) != 0 {
registers.WriteString("● ")
} else {