* config/mips/mips.h (ASM_OUTPUT_ASCII): Convert to function.
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 May 2001 19:39:30 +0000 (19:39 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 May 2001 19:39:30 +0000 (19:39 +0000)
* config/mips/mips.c (mips_output_ascii): New function.
* config/mips/mips-protos.h (mips_output_ascii): Prototype.

* config/mips/mips.h (DWARF_CIE_DATA_ALIGNMENT): Force to 4.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42753 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips-protos.h
gcc/config/mips/mips.c
gcc/config/mips/mips.h

index e568026..ff8afc9 100644 (file)
@@ -1,3 +1,11 @@
+2001-05-31  Geoff Keating  <geoffk@cygnus.com>
+
+       * config/mips/mips.h (ASM_OUTPUT_ASCII): Convert to function.
+       * config/mips/mips.c (mips_output_ascii): New function.
+       * config/mips/mips-protos.h (mips_output_ascii): Prototype.
+
+       * config/mips/mips.h (DWARF_CIE_DATA_ALIGNMENT): Force to 4.
+
 Thu May 31 19:09:53 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * flow.c (set_block_for_new_insns): Remove bogus shortcut.
index 2cc8166..81e15a1 100644 (file)
@@ -41,6 +41,7 @@ extern void           mips_output_float PARAMS ((FILE *, REAL_VALUE_TYPE));
 #endif /* REAL_VALUE_TYPE */
 extern void            mips_output_filename PARAMS ((FILE *, const char *));
 extern void            mips_output_lineno PARAMS ((FILE *, int));
+extern void            mips_output_ascii PARAMS ((FILE *, const char *, size_t));
 extern void            mips_order_regs_for_local_alloc PARAMS ((void));
 extern struct rtx_def *        mips16_gp_pseudo_reg PARAMS ((void));
 #ifdef ASM_OUTPUT_UNDEF_FUNCTION
index c90857e..05edaff 100644 (file)
@@ -5882,6 +5882,85 @@ mips_output_lineno (stream, line)
     }
 }
 \f
+/* Output an ASCII string, in a space-saving way.  */
+
+void 
+mips_output_ascii (stream, string_param, len)
+     FILE *stream;
+     const char *string_param;
+     size_t len;
+{
+  size_t i;
+  int cur_pos = 17;
+  register const unsigned char *string =
+    (const unsigned char *)string_param;
+
+  fprintf (stream, "\t.ascii\t\"");                                    
+  for (i = 0; i < len; i++)                                            
+    {                                                                  
+      register int c = string[i];                                      
+      
+      switch (c)                                                       
+       {                                                               
+       case '\"':                                                      
+       case '\\':                                                      
+         putc ('\\', stream);                                  
+         putc (c, stream);                                             
+         cur_pos += 2;                                                 
+         break;                                                        
+         
+       case TARGET_NEWLINE:                                            
+         fputs ("\\n", stream);                                        
+         if (i+1 < len                                                 
+             && (((c = string[i+1]) >= '\040' && c <= '~')             
+                 || c == TARGET_TAB))                                  
+           cur_pos = 32767;            /* break right here */          
+         else                                                          
+           cur_pos += 2;                                               
+         break;                                                        
+         
+       case TARGET_TAB:                                                
+         fputs ("\\t", stream);                                        
+         cur_pos += 2;                                                 
+         break;                                                        
+         
+       case TARGET_FF:                                                 
+         fputs ("\\f", stream);                                        
+         cur_pos += 2;                                                 
+         break;                                                        
+         
+       case TARGET_BS:                                                 
+         fputs ("\\b", stream);                                        
+         cur_pos += 2;                                                 
+         break;                                                        
+         
+       case TARGET_CR:                                                 
+         fputs ("\\r", stream);                                        
+         cur_pos += 2;                                                 
+         break;                                                        
+         
+       default:                                                        
+         if (c >= ' ' && c < 0177)                                     
+           {                                                           
+             putc (c, stream);                                 
+             cur_pos++;                                                
+           }                                                           
+         else                                                          
+           {                                                           
+             fprintf (stream, "\\%03o", c);                            
+             cur_pos += 4;                                             
+           }                                                           
+       }                                                               
+      
+      if (cur_pos > 72 && i+1 < len)                                   
+       {                                                               
+         cur_pos = 17;                                                 
+         fprintf (stream, "\"\n\t.ascii\t\"");                 
+       }                                                               
+    }                                                                  
+  fprintf (stream, "\"\n");                                            
+}
+\f
 /* If defined, a C statement to be executed just prior to the output of
    assembler code for INSN, to modify the extracted operands so they will be
    output differently.
index 3d3ea80..77bc6fd 100644 (file)
@@ -1109,6 +1109,11 @@ while (0)
 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + GP_ARG_FIRST : INVALID_REGNUM)
 #define EH_RETURN_STACKADJ_RTX  gen_rtx_REG (Pmode, GP_REG_FIRST + 3)
 
+/* Offsets recorded in opcodes are a multiple of this alignment factor.  
+   The default for this in 64-bit mode is 8, which causes problems with
+   SFmode register saves.  */
+#define DWARF_CIE_DATA_ALIGNMENT 4
+
 /* Overrides for the COFF debug format.  */
 #define PUT_SDB_SCL(a)                                 \
 do {                                                   \
@@ -4392,75 +4397,7 @@ do {                                                                     \
 /* This is how to output a string.  */
 #undef ASM_OUTPUT_ASCII
 #define ASM_OUTPUT_ASCII(STREAM, STRING, LEN)                          \
-do {                                                                   \
-  register int i, c, len = (LEN), cur_pos = 17;                                \
-  register const unsigned char *string =                               \
-    (const unsigned char *)(STRING);                                   \
-  fprintf ((STREAM), "\t.ascii\t\"");                                  \
-  for (i = 0; i < len; i++)                                            \
-    {                                                                  \
-      register int c = string[i];                                      \
-                                                                       \
-      switch (c)                                                       \
-       {                                                               \
-       case '\"':                                                      \
-       case '\\':                                                      \
-         putc ('\\', (STREAM));                                        \
-         putc (c, (STREAM));                                           \
-         cur_pos += 2;                                                 \
-         break;                                                        \
-                                                                       \
-       case TARGET_NEWLINE:                                            \
-         fputs ("\\n", (STREAM));                                      \
-         if (i+1 < len                                                 \
-             && (((c = string[i+1]) >= '\040' && c <= '~')             \
-                 || c == TARGET_TAB))                                  \
-           cur_pos = 32767;            /* break right here */          \
-         else                                                          \
-           cur_pos += 2;                                               \
-         break;                                                        \
-                                                                       \
-       case TARGET_TAB:                                                \
-         fputs ("\\t", (STREAM));                                      \
-         cur_pos += 2;                                                 \
-         break;                                                        \
-                                                                       \
-       case TARGET_FF:                                                 \
-         fputs ("\\f", (STREAM));                                      \
-         cur_pos += 2;                                                 \
-         break;                                                        \
-                                                                       \
-       case TARGET_BS:                                                 \
-         fputs ("\\b", (STREAM));                                      \
-         cur_pos += 2;                                                 \
-         break;                                                        \
-                                                                       \
-       case TARGET_CR:                                                 \
-         fputs ("\\r", (STREAM));                                      \
-         cur_pos += 2;                                                 \
-         break;                                                        \
-                                                                       \
-       default:                                                        \
-         if (c >= ' ' && c < 0177)                                     \
-           {                                                           \
-             putc (c, (STREAM));                                       \
-             cur_pos++;                                                \
-           }                                                           \
-         else                                                          \
-           {                                                           \
-             fprintf ((STREAM), "\\%03o", c);                          \
-             cur_pos += 4;                                             \
-           }                                                           \
-       }                                                               \
-                                                                       \
-      if (cur_pos > 72 && i+1 < len)                                   \
-       {                                                               \
-         cur_pos = 17;                                                 \
-         fprintf ((STREAM), "\"\n\t.ascii\t\"");                       \
-       }                                                               \
-    }                                                                  \
-  fprintf ((STREAM), "\"\n");                                          \
-} while (0)
+  mips_output_ascii (STREAM, STRING, LEN)
 
 /* Handle certain cpp directives used in header files on sysV.  */
 #define SCCS_DIRECTIVE