IvannosysTargetArch.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package common;
  7. /**
  8. *
  9. * @author Eugenio
  10. * @param
  11. */
  12. public interface IvannosysTargetArch {
  13. public IvannosysTargetArch Init(Code tac) throws Exception;
  14. public IvannosysTargetArch Compile() throws Exception;
  15. public IvannosysTargetArch Format() throws Exception;
  16. // Export gera a representacao fisica do codigo
  17. // Sua funcao é gerar o(s) arquivo(s) de saida
  18. public IvannosysTargetArch Export() throws Exception;
  19. // Metodos de traduzir tac para target
  20. public void Prolog(String id) throws Exception;
  21. public void Epilog(String id) throws Exception;
  22. public void TranslateLabel(Instruction inst) throws Exception;
  23. public void TranslateAssign(Instruction inst) throws Exception;
  24. public void TranslateJump(Instruction inst) throws Exception;
  25. public void TranslateCall(Instruction inst) throws Exception;
  26. public void TranslateReturn(Instruction inst) throws Exception;
  27. public void TranslatePushParam(Instruction inst) throws Exception;
  28. public void TranslatePushReturn(Instruction inst) throws Exception;
  29. public void TranslatePopReturn(Instruction inst) throws Exception;
  30. public void TranslatePopParam(Instruction inst) throws Exception;
  31. public void TranslateBranch(Instruction inst) throws Exception;
  32. public void TranslateUnary(Instruction inst) throws Exception;
  33. public void TranslateIndexedAssignment(Instruction inst) throws Exception;
  34. public void TranslateCopy(Instruction inst) throws Exception;
  35. public void TranslatePointerAssignment(Instruction inst) throws Exception;
  36. public void TranslateLoad(Instruction inst) throws Exception;
  37. public void TranslateStore(Instruction inst) throws Exception;
  38. }