tm-sequent.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* Definitions of target machine for GNU compiler. SEQUENT NS32000 version.
  2. Copyright (C) 1987 Free Software Foundation, Inc.
  3. Contributed by Michael Tiemann (tiemann@mcc.com)
  4. This file is part of GNU CC.
  5. GNU CC is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY. No author or distributor
  7. accepts responsibility to anyone for the consequences of using it
  8. or for whether it serves any particular purpose or works at all,
  9. unless he says so in writing. Refer to the GNU CC General Public
  10. License for full details.
  11. Everyone is granted permission to copy, modify and redistribute
  12. GNU CC, but only under the conditions described in the
  13. GNU CC General Public License. A copy of this license is
  14. supposed to have been given to you along with GNU CC so you
  15. can know your rights and responsibilities. It should be in a
  16. file named COPYING. Among other things, the copyright notice
  17. and this notice must be preserved on all copies. */
  18. #define SEQUENT_ADDRESS_BUG 1
  19. #include "tm-ns32k.h"
  20. /* Sequent has some changes in the format of DBX symbols. */
  21. #define DBX_NO_XREFS 1
  22. /* Don't split DBX symbols into continuations. */
  23. #define DBX_CONTIN_LENGTH 0
  24. #define TARGET_DEFAULT 1
  25. #undef TARGET_VERSION
  26. #undef CPP_PREDEFINES
  27. #undef PRINT_OPERAND
  28. #undef PRINT_OPERAND_ADDRESS
  29. /* Print subsidiary information on the compiler version in use. */
  30. #define TARGET_VERSION printf (" (32000, Sequent syntax)");
  31. #define CPP_PREDEFINES "-Dns32000 -Dsequent -Dunix"
  32. /* %$ means print the prefix for an immediate operand.
  33. On the sequent, no prefix is used for such. */
  34. #define PRINT_OPERAND(FILE, X, CODE) \
  35. { if (CODE == '$') ; \
  36. else if (GET_CODE (X) == REG) \
  37. fprintf (FILE, "%s", reg_name [REGNO (X)]); \
  38. else if (GET_CODE (X) == MEM) \
  39. { \
  40. rtx xfoo; \
  41. xfoo = XEXP (X, 0); \
  42. switch (GET_CODE (xfoo)) \
  43. { \
  44. case MEM: \
  45. if (GET_CODE (XEXP (xfoo, 0)) == REG) \
  46. if (REGNO (XEXP (xfoo, 0)) == STACK_POINTER_REGNUM) \
  47. fprintf (FILE, "0(0(sp))"); \
  48. else fprintf (FILE, "0(0(%s))", \
  49. reg_name [REGNO (XEXP (xfoo, 0))]); \
  50. else \
  51. { \
  52. fprintf (FILE, "0("); \
  53. output_address (xfoo); \
  54. putc (')', FILE); \
  55. } \
  56. break; \
  57. case REG: \
  58. fprintf (FILE, "0(%s)", reg_name [REGNO (xfoo)]); \
  59. break; \
  60. case PRE_DEC: \
  61. case POST_INC: \
  62. fprintf (FILE, "tos"); \
  63. break; \
  64. case CONST_INT: \
  65. fprintf (FILE, "@%d", INTVAL (xfoo)); \
  66. break; \
  67. default: \
  68. output_address (xfoo); \
  69. break; \
  70. } \
  71. } \
  72. else if (GET_CODE (X) == CONST_DOUBLE) \
  73. if (GET_MODE (X) == DFmode) \
  74. { union { double d; int i[2]; } u; \
  75. u.i[0] = XINT (X, 0); u.i[1] = XINT (X, 1); \
  76. fprintf (FILE, "0d%.20e", u.d); } \
  77. else fprintf (FILE, "0f%.20e", XINT (X, 0)); \
  78. else output_addr_const (FILE, X); }
  79. #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR)