Removed unnecessary list of registers
This commit is contained in:
parent
bfa8f9c7c4
commit
cc1c990dc8
4 changed files with 3 additions and 4 deletions
|
@ -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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue