data.h 1.5 KB

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