Refactored assembly compilation
This commit is contained in:
@ -27,13 +27,17 @@ func Finalize(a *asm.Assembler, dlls dll.List) ([]byte, []byte) {
|
||||
|
||||
switch config.TargetArch {
|
||||
case config.ARM:
|
||||
armc := armCompiler{compiler: &c}
|
||||
|
||||
for _, x := range a.Instructions {
|
||||
c.ARM(x)
|
||||
armc.Compile(x)
|
||||
}
|
||||
|
||||
case config.X86:
|
||||
x86c := x86Compiler{compiler: &c}
|
||||
|
||||
for _, x := range a.Instructions {
|
||||
c.X86(x)
|
||||
x86c.Compile(x)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user