home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gcc-2.7.2.1-base.tgz / gcc-2.7.2.1-base.tar / fsf / gcc / config / m68k / next21.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  4KB  |  105 lines

  1. /* Target definitions for GNU compiler for mc680x0 running NeXTSTEP 2.1
  2.    Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 59 Temple Place - Suite 330,
  19. Boston, MA 02111-1307, USA.  */
  20.  
  21. /* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */
  22.  
  23. #include "m68k/next.h"
  24. #include "nextstep21.h"
  25.  
  26. /* for #include <mach.h> in libgcc2.c */
  27. #define NeXTStep21    
  28.  
  29. #undef    ASM_OUTPUT_DOUBLE
  30. #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  31.  do { if (REAL_VALUE_ISINF (VALUE))                    \
  32.         {                                \
  33.           if (REAL_VALUE_NEGATIVE (VALUE))                \
  34.             fprintf (FILE, "#0r-99e999");                \
  35.           else                                \
  36.             fprintf (FILE, "#0r99e999");                \
  37.         }                                \
  38.       else                                \
  39.         { char dstr[30];                        \
  40.           REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);        \
  41.           fprintf (FILE, "\t.double 0r%s\n", dstr);            \
  42.         }                                \
  43.     } while (0)
  44.  
  45. /* This is how to output an assembler line defining a `float' constant.  */
  46. #undef    ASM_OUTPUT_FLOAT
  47. #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  48.  do { if (REAL_VALUE_ISINF (VALUE))                    \
  49.         {                                \
  50.           if (REAL_VALUE_NEGATIVE (VALUE))                \
  51.             fprintf (FILE, "\t.single 0r-99e999\n");            \
  52.           else                                \
  53.             fprintf (FILE, "\t.single 0r99e999\n");            \
  54.         }                                \
  55.       else                                \
  56.         { char dstr[30];                        \
  57.           REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);        \
  58.           fprintf (FILE, "\t.single 0r%s\n", dstr);            \
  59.         }                                \
  60.     } while (0)
  61.  
  62. /* called from m68k.c line 1881 */
  63. #undef    ASM_OUTPUT_FLOAT_OPERAND
  64. #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)        \
  65.   do{                                 \
  66.       if (CODE != 'f')                        \
  67.         {                            \
  68.           long l;                        \
  69.           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);        \
  70.           if (sizeof (int) == sizeof (long))            \
  71.             asm_fprintf ((FILE), "%I0x%x", l);            \
  72.           else                            \
  73.             asm_fprintf ((FILE), "%I0x%lx", l);            \
  74.         }                            \
  75.       else if (REAL_VALUE_ISINF (VALUE))            \
  76.         {                            \
  77.           if (REAL_VALUE_NEGATIVE (VALUE))            \
  78.             fprintf (FILE, "#0r-99e999");            \
  79.           else                            \
  80.             fprintf (FILE, "#0r99e999");            \
  81.         }                            \
  82.       else                            \
  83.         { char dstr[30];                    \
  84.           REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr);    \
  85.           fprintf (FILE, "#0r%s", dstr);            \
  86.         }                            \
  87.     } while (0)
  88.  
  89. #undef    ASM_OUTPUT_DOUBLE_OPERAND
  90. #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                \
  91.  do { if (REAL_VALUE_ISINF (VALUE))                    \
  92.         {                                \
  93.           if (REAL_VALUE_NEGATIVE (VALUE))                \
  94.             fprintf (FILE, "#0r-99e999");                \
  95.           else                                \
  96.             fprintf (FILE, "#0r99e999");                \
  97.         }                                \
  98.       else                                \
  99.        { char dstr[30];                            \
  100.           REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr);        \
  101.           fprintf (FILE, "#0r%s", dstr);                \
  102.        }                                \
  103.     } while (0)
  104.  
  105.