mach1.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* $Header$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* @(#)mach1.c 1.8 */
  7. /*
  8. * Motorola 68000/68010 dependent C declarations
  9. */
  10. #define low3(z) ((short)(z) & 07)
  11. #define low4(z) ((short)(z) & 017)
  12. #define fit3(z) ((((z)-1) & ~07) == 0)
  13. #define fit4(z) (((z) & ~017) == 0)
  14. #define fit8(z) (((z) & ~0xFF) == 0)
  15. #define fit16(z) (((z) & ~0xFFFF) == 0)
  16. #define SIZE_B 0000
  17. #define SIZE_W 0100
  18. #define SIZE_L 0200
  19. #define SIZE_NON 0300
  20. #define SIZE_DEF SIZE_W
  21. extern int mrg_1,mrg_2;
  22. extern expr_t exp_1,exp_2;
  23. #ifndef ASLD
  24. extern valu_t rel_1,rel_2;
  25. #endif
  26. extern int model; /* 68000/68010 */
  27. /* addressing mode bits */
  28. #define DTA 0x01
  29. #define MEM 0x02
  30. #define CTR 0x04
  31. #define ALT 0x08
  32. #define FITB 0x10
  33. #define FITW 0x20
  34. #define PUTW 0x40
  35. #define PUTL 0x80
  36. #ifndef extern
  37. extern short eamode[];
  38. #else
  39. short eamode[] = {
  40. /* 00A */ DTA |ALT,
  41. /* 01A */ ALT,
  42. /* 02A */ DTA|MEM|CTR|ALT,
  43. /* 03A */ DTA|MEM |ALT,
  44. /* 04A */ DTA|MEM |ALT,
  45. /* 05A */ DTA|MEM|CTR|ALT|FITW|PUTW | (RELO2 )<<8,
  46. /* 06A */ DTA|MEM|CTR|ALT |PUTW | (RELO1 )<<8,
  47. /* 07x */ 0,
  48. /* 070 */ DTA|MEM|CTR|ALT|FITW|PUTW | (RELO2 )<<8,
  49. /* 071 */ DTA|MEM|CTR|ALT |PUTL | (RELO4 )<<8,
  50. /* 072 */ DTA|MEM|CTR |FITW|PUTW | (RELO2|RELPC)<<8,
  51. /* 073 */ DTA|MEM|CTR |PUTW | (RELO1|RELPC)<<8,
  52. /* 074x */ 0,
  53. /* 074B */ DTA|MEM |FITB|PUTW | (RELO1 )<<8,
  54. /* 074W */ DTA|MEM |FITW|PUTW | (RELO2 )<<8,
  55. /* 074L */ DTA|MEM |PUTL | (RELO4 )<<8,
  56. };
  57. #endif