mach1.c 1.4 KB

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