i386.c (asm_output_function_prefix, [...]): Use ASM_GENERATE_INTERNAL_LABEL properly.
authorRichard Henderson <rth@cygnus.com>
Sat, 4 Apr 1998 20:25:44 +0000 (12:25 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 4 Apr 1998 20:25:44 +0000 (12:25 -0800)
* i386.c (asm_output_function_prefix, load_pic_register):
Use ASM_GENERATE_INTERNAL_LABEL properly.
(output_pic_addr_const): Recognize %X to supress any PIC sym suffix.
(print_operand): Ignore it.
(load_pic_register): Use it for the got load call.
* i386.md (prologue_set_got, prologue_get_pc): Likewise.
(prologue_get_pc_and_set_got): Likewise.
* i386.h: Update print_operand docs.

From-SVN: r19000

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md

index f7bb7c1ce44283a0a9308495968da530c0d7cf56..e1798acf74d7b0494008928405bbab07ddee6a24 100644 (file)
@@ -1,3 +1,14 @@
+Sat Apr  4 20:16:46 1998  Richard Henderson  <rth@cygnus.com>
+
+       * i386.c (asm_output_function_prefix, load_pic_register):
+       Use ASM_GENERATE_INTERNAL_LABEL properly.
+       (output_pic_addr_const): Recognize %X to supress any PIC sym suffix.
+       (print_operand): Ignore it.
+       (load_pic_register): Use it for the got load call.
+       * i386.md (prologue_set_got, prologue_get_pc): Likewise.
+       (prologue_get_pc_and_set_got): Likewise.
+       * i386.h: Update print_operand docs.
+
 Sat Apr  4 19:08:37 1998  Richard Henderson  <rth@cygnus.com>
 
        * i386.md (ffssi, ffshi): Rewrite as define_expands.
index 1232b4a46f6d9b981ca09e881dd3c117da0a9b59..f4743faaf819d0c513a34f0bb110b3760623d2be 100644 (file)
@@ -1911,7 +1911,7 @@ asm_output_function_prefix (file, name)
       if (pic_label_rtx == 0)
        {
          pic_label_rtx = gen_label_rtx ();
-         sprintf (pic_label_name, "LPR%d", pic_label_no++);
+         ASM_GENERATE_INTERNAL_LABEL (pic_label_name, "LPR", pic_label_no++);
          LABEL_NAME (pic_label_rtx) = pic_label_name;
        }
 
@@ -1966,7 +1966,7 @@ load_pic_register (do_rtl)
       if (pic_label_rtx == 0)
        {
          pic_label_rtx = gen_label_rtx ();
-         sprintf (pic_label_name, "LPR%d", pic_label_no++);
+         ASM_GENERATE_INTERNAL_LABEL (pic_label_name, "LPR", pic_label_no++);
          LABEL_NAME (pic_label_rtx) = pic_label_name;
        }
 
@@ -1984,7 +1984,7 @@ load_pic_register (do_rtl)
        }
       else
        {
-         output_asm_insn (AS1 (call,%P1), xops);
+         output_asm_insn (AS1 (call,%X1), xops);
          output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_,%0", xops);
          pic_label_rtx = 0;
        }
@@ -2979,7 +2979,9 @@ output_pic_addr_const (file, x, code)
          assemble_name (asm_out_file, buf);
        }
 
-      if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x))
+      if (code == 'X')
+       ; /* No suffix, dammit. */
+      else if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x))
        fprintf (file, "@GOTOFF(%%ebx)");
       else if (code == 'P')
        fprintf (file, "@PLT");
@@ -3272,6 +3274,7 @@ print_operand (file, x, code)
        case 'h':
        case 'y':
        case 'P':
+       case 'X':
          break;
 
        case 'J':
@@ -3550,7 +3553,7 @@ print_operand_address (file, addr)
 \f
 /* Set the cc_status for the results of an insn whose pattern is EXP.
    On the 80386, we assume that only test and compare insns, as well
-   as SI, HI, & DI mode ADD, SUB, NEG, AND, IOR, XOR, ASHIFT,
+   as SI, HI, & DI mode ADD, SUB, NEG, AND, IOR, XOR, BSF, ASHIFT,
    ASHIFTRT, and LSHIFTRT instructions set the condition codes usefully.
    Also, we assume that jumps, moves and sCOND don't affect the condition
    codes.  All else clobbers the condition codes, by assumption.
index adab26d549ceb39c8f28680652fd6dac176b607b..8775a5ba786870d00e85faf08fb88d3f07884d8c 100644 (file)
@@ -2509,9 +2509,13 @@ do { long l;                                             \
    R -- print the prefix for register names.
    z -- print the opcode suffix for the size of the current operand.
    * -- print a star (in certain assembler syntax)
-   w -- print the operand as if it's a "word" (HImode) even if it isn't.
-   b -- print the operand as if it's a byte (QImode) even if it isn't.
-   c -- don't print special prefixes before constant operands.  */
+   P -- if PIC, print an @PLT suffix.
+   X -- don't print any sort of PIC '@' suffix for a symbol.
+   J -- print jump insn for arithmetic_comparison_operator.
+   s -- ??? something to do with double shifts.  not actually used, afaik.
+   C -- print a conditional move suffix corresponding to the op code.
+   c -- likewise, but reverse the condition.
+   F,f -- likewise, but for floating-point.  */
 
 #define PRINT_OPERAND_PUNCT_VALID_P(CODE)                              \
   ((CODE) == '*')
index 3a88982852a0d6e0a2d1d7e6d070c95a41ce1515..5bdb141fbba28189ec9c34c82f475c41a3e1c5da 100644 (file)
@@ -6657,7 +6657,7 @@ byte_xor_operation:
     }
   else  
     {
-      sprintf (buffer, \"addl %s+[.-%%P2],%%0\", XSTR (operands[1], 0));
+      sprintf (buffer, \"addl %s+[.-%%X2],%%0\", XSTR (operands[1], 0));
       output_asm_insn (buffer, operands);
     }    
   RET;
@@ -6671,7 +6671,7 @@ byte_xor_operation:
 {
   char buffer[64];
 
-  output_asm_insn (AS1 (call,%P1), operands);
+  output_asm_insn (AS1 (call,%X1), operands);
   if (! TARGET_DEEP_BRANCH_PREDICTION) 
     {
       ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[1]));
@@ -6685,11 +6685,11 @@ byte_xor_operation:
   "*
 {
   operands[1] = gen_label_rtx ();
-  output_asm_insn (AS1 (call,%P1), operands);
+  output_asm_insn (AS1 (call,%X1), operands);
   ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
                             CODE_LABEL_NUMBER (operands[1]));
   output_asm_insn (AS1 (pop%L0,%0), operands);
-  output_asm_insn (\"addl $_GLOBAL_OFFSET_TABLE_+[.-%P1],%0\", operands);
+  output_asm_insn (\"addl $_GLOBAL_OFFSET_TABLE_+[.-%X1],%0\", operands);
   RET;
 }")