Skip to content
Snippets Groups Projects
Commit 5f922a1d authored by ZaynouneFatimaZahrae's avatar ZaynouneFatimaZahrae
Browse files

sa2ts

parent c16c77d3
No related branches found
No related tags found
No related merge requests found
...@@ -169,7 +169,10 @@ public class C3a2nasm implements C3aVisitor <NasmOperand> { ...@@ -169,7 +169,10 @@ public class C3a2nasm implements C3aVisitor <NasmOperand> {
} }
public NasmOperand visit(C3aInstParam inst){ public NasmOperand visit(C3aInstParam inst){
NasmOperand label = (inst.label != null) ? inst.label.accept(this): null; NasmOperand label = (inst.label != null) ? inst.label.accept(this): null;
//nasm.ajouteInst(new NasmMov()); NasmOperand addr = inst.label.accept(this);
NasmOperand destination = inst.label.accept(this);
NasmOperand source = inst.label.accept(this);
nasm.ajouteInst(new NasmMov(label, addr, destination, source, ""));
return null; return null;
} }
public NasmOperand visit(C3aInstReturn inst){ public NasmOperand visit(C3aInstReturn inst){
......
...@@ -15,6 +15,10 @@ public class NasmMov extends NasmInst { ...@@ -15,6 +15,10 @@ public class NasmMov extends NasmInst {
super(); super();
} }
public NasmMov(NasmOperand label, NasmOperand addr, NasmOperand destination, NasmOperand source, String s) {
super();
}
public <T> T accept(NasmVisitor <T> visitor) { public <T> T accept(NasmVisitor <T> visitor) {
return visitor.visit(this); return visitor.visit(this);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment