Commit 5cb6195d by Richard Henderson Committed by Richard Henderson

i386.c (asm_output_function_prefix, [...]): Use ASM_GENERATE_INTERNAL_LABEL properly.

* 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
parent ce193852
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> Sat Apr 4 19:08:37 1998 Richard Henderson <rth@cygnus.com>
* i386.md (ffssi, ffshi): Rewrite as define_expands. * i386.md (ffssi, ffshi): Rewrite as define_expands.
......
...@@ -1911,7 +1911,7 @@ asm_output_function_prefix (file, name) ...@@ -1911,7 +1911,7 @@ asm_output_function_prefix (file, name)
if (pic_label_rtx == 0) if (pic_label_rtx == 0)
{ {
pic_label_rtx = gen_label_rtx (); 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; LABEL_NAME (pic_label_rtx) = pic_label_name;
} }
...@@ -1966,7 +1966,7 @@ load_pic_register (do_rtl) ...@@ -1966,7 +1966,7 @@ load_pic_register (do_rtl)
if (pic_label_rtx == 0) if (pic_label_rtx == 0)
{ {
pic_label_rtx = gen_label_rtx (); 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; LABEL_NAME (pic_label_rtx) = pic_label_name;
} }
...@@ -1984,7 +1984,7 @@ load_pic_register (do_rtl) ...@@ -1984,7 +1984,7 @@ load_pic_register (do_rtl)
} }
else else
{ {
output_asm_insn (AS1 (call,%P1), xops); output_asm_insn (AS1 (call,%X1), xops);
output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_,%0", xops); output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_,%0", xops);
pic_label_rtx = 0; pic_label_rtx = 0;
} }
...@@ -2979,7 +2979,9 @@ output_pic_addr_const (file, x, code) ...@@ -2979,7 +2979,9 @@ output_pic_addr_const (file, x, code)
assemble_name (asm_out_file, buf); 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)"); fprintf (file, "@GOTOFF(%%ebx)");
else if (code == 'P') else if (code == 'P')
fprintf (file, "@PLT"); fprintf (file, "@PLT");
...@@ -3272,6 +3274,7 @@ print_operand (file, x, code) ...@@ -3272,6 +3274,7 @@ print_operand (file, x, code)
case 'h': case 'h':
case 'y': case 'y':
case 'P': case 'P':
case 'X':
break; break;
case 'J': case 'J':
...@@ -3550,7 +3553,7 @@ print_operand_address (file, addr) ...@@ -3550,7 +3553,7 @@ print_operand_address (file, addr)
/* Set the cc_status for the results of an insn whose pattern is EXP. /* 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 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. ASHIFTRT, and LSHIFTRT instructions set the condition codes usefully.
Also, we assume that jumps, moves and sCOND don't affect the condition Also, we assume that jumps, moves and sCOND don't affect the condition
codes. All else clobbers the condition codes, by assumption. codes. All else clobbers the condition codes, by assumption.
......
...@@ -2509,9 +2509,13 @@ do { long l; \ ...@@ -2509,9 +2509,13 @@ do { long l; \
R -- print the prefix for register names. R -- print the prefix for register names.
z -- print the opcode suffix for the size of the current operand. z -- print the opcode suffix for the size of the current operand.
* -- print a star (in certain assembler syntax) * -- print a star (in certain assembler syntax)
w -- print the operand as if it's a "word" (HImode) even if it isn't. P -- if PIC, print an @PLT suffix.
b -- print the operand as if it's a byte (QImode) even if it isn't. X -- don't print any sort of PIC '@' suffix for a symbol.
c -- don't print special prefixes before constant operands. */ 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) \ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
((CODE) == '*') ((CODE) == '*')
......
...@@ -6657,7 +6657,7 @@ byte_xor_operation: ...@@ -6657,7 +6657,7 @@ byte_xor_operation:
} }
else 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); output_asm_insn (buffer, operands);
} }
RET; RET;
...@@ -6671,7 +6671,7 @@ byte_xor_operation: ...@@ -6671,7 +6671,7 @@ byte_xor_operation:
{ {
char buffer[64]; char buffer[64];
output_asm_insn (AS1 (call,%P1), operands); output_asm_insn (AS1 (call,%X1), operands);
if (! TARGET_DEEP_BRANCH_PREDICTION) if (! TARGET_DEEP_BRANCH_PREDICTION)
{ {
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[1])); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (operands[1]));
...@@ -6685,11 +6685,11 @@ byte_xor_operation: ...@@ -6685,11 +6685,11 @@ byte_xor_operation:
"* "*
{ {
operands[1] = gen_label_rtx (); 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\", ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\",
CODE_LABEL_NUMBER (operands[1])); CODE_LABEL_NUMBER (operands[1]));
output_asm_insn (AS1 (pop%L0,%0), operands); 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; RET;
}") }")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment