instruct.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #ifndef LANG_NCGG_INSTRUCT_H
  7. #define LANG_NCGG_INSTRUCT_H
  8. #ifndef _COST_
  9. #include "cost.h"
  10. #endif
  11. #define AD_RO 01 /* Read only operand */
  12. #define AD_WO 02 /* Write only operand */
  13. #define AD_RW 03 /* Read-write operand */
  14. #define AD_RWMASK 03 /* Mask to select these possiblities */
  15. #define AD_CC 04 /* Condition codes set to this one */
  16. typedef struct operand {
  17. struct operand *o_next;
  18. short o_setno;
  19. short o_adorn;
  20. } operand;
  21. typedef struct instruction {
  22. char *i_name;
  23. short i_asname;
  24. short i_nops;
  25. operand *i_oplist;
  26. struct varinfo *i_erases;
  27. cost_t i_cost;
  28. } instr_t,*instr_p;
  29. extern instr_t l_instr[];
  30. /*
  31. * The read only information on the operands is not used at the moment.
  32. * Predicted future use:
  33. * When using :ro data it is possible to use a register in its stead
  34. * if it contains the same information and is allowed as an operand
  35. * in this place. Too difficult for now.
  36. */
  37. #endif /* LANG_NCGG_INSTRUCT_H */