data.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. typedef struct cost {
  7. short ct_space;
  8. short ct_time;
  9. } cost_t,*cost_p;
  10. typedef struct {
  11. string ea_str;
  12. word ea_off;
  13. } addr_t;
  14. typedef struct {
  15. int t_token; /* kind of token, -1 for register */
  16. union {
  17. word aw; /* integer type */
  18. addr_t aa; /* address type */
  19. int ar; /* register type */
  20. } t_att[TOKENSIZE];
  21. } token_t,*token_p;
  22. struct reginfo {
  23. int r_repr; /* index in string table */
  24. int r_size; /* size in bytes */
  25. #if MAXMEMBERS!=0
  26. int r_members[MAXMEMBERS]; /* register contained within this reg */
  27. short r_clash[REGSETSIZE]; /* set of clashing registers */
  28. int r_iclash; /* index in clashlist; other represen-
  29. tation of r_clash
  30. */
  31. #endif
  32. int r_refcount; /* Times in use */
  33. token_t r_contents; /* Current contents */
  34. int r_tcount; /* Temporary count difference */
  35. };
  36. #if MAXMEMBERS!=0
  37. #define clash(a,b) ((machregs[a].r_clash[(b)>>4]&(1<<((b)&017)))!=0)
  38. #else
  39. #define clash(a,b) ((a)==(b))
  40. #endif
  41. typedef struct {
  42. int t_size; /* size in bytes */
  43. cost_t t_cost; /* cost in bytes and time */
  44. byte t_type[TOKENSIZE]; /* types of attributes, TT_??? */
  45. int t_format; /* index of formatstring */
  46. } tkdef_t,*tkdef_p;
  47. struct emline {
  48. int em_instr;
  49. int em_optyp;
  50. string em_soper;
  51. union {
  52. word em_ioper;
  53. long em_loper;
  54. } em_u;
  55. };
  56. #define OPNO 0
  57. #define OPINT 1
  58. #define OPSYMBOL 2
  59. typedef struct {
  60. int rl_n; /* number in list */
  61. int rl_list[NREGS];
  62. } rl_t,*rl_p;