TestInstruction.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 IntermediaryCode;
  7. import common.Instruction;
  8. /**
  9. *
  10. * @author Eugenio
  11. */
  12. public class TestInstruction {
  13. /**
  14. * 6 5 5 5 5 6
  15. * +--------+--------+-------+-------+------+--------+ R-type format<br>
  16. * | Op-code| Rs | Rt | Rd | SA |Funct-code|
  17. * +--------+--------+-------+-------+------+--------+ <br>
  18. * 6 5 5 16 <br>
  19. * +--------+--------+-------+------------------------+ I-type format<br>
  20. * |Op-code | Rs | Rt | 2’s complement constant|
  21. * +--------+--------+-------+------------------------+ <br>
  22. * 6 26<br>
  23. * +--------+-----------------------------------------+ J-type format<br>
  24. * |Op-code| jump_target |
  25. * +--------+-----------------------------------------+ <br>
  26. * bit 31 bit 0
  27. *
  28. * @param r2
  29. * @param tipo
  30. */
  31. public void testar(Instruction r2, String tipo) {
  32. // System.out.println("TESTAR:" + r2);
  33. switch (tipo) {
  34. case "R":
  35. break;
  36. case "J":
  37. break;
  38. case "I":
  39. break;
  40. }
  41. }
  42. }