Commit d119f84c by Richard Henderson

Donn Terry <donn@interix.com>

Donn Terry  <donn@interix.com>
        * i386.h (PRINT_OPERAND_PUNCT_VALID_P): Allow _.
        * i386.c (print_operand): New %_ operator.
        (load_pic_register): Proper number of leading _ in GOT literal.
        * i386.md (prologue_get_pc_and_set_got): Likewise.
        * i386/unix.h (ASM_OUTPUT_MI_THUNK): Likewise.

From-SVN: r26525
parent f9d7e5cd
Mon Apr 19 08:12:30 1999 Richard Henderson <rth@cygnus.com> Sat Apr 17 19:13:22 1999 Donn Terry <donn@interix.com>
* i386.h (PRINT_OPERAND_PUNCT_VALID_P): Allow _.
* i386.c (print_operand): New %_ operator.
(load_pic_register): Proper number of leading _ in GOT literal.
* i386.md (prologue_get_pc_and_set_got): Likewise.
* i386/unix.h (ASM_OUTPUT_MI_THUNK): Likewise.
Sat Apr 17 19:13:07 1999 Richard Henderson <rth@cygnus.com>
* alpha.c (alpha_expand_prologue): Use gen_adddi3 instead of * alpha.c (alpha_expand_prologue): Use gen_adddi3 instead of
emit_move_insn+plus_constant. For NT, don't use the stack probe emit_move_insn+plus_constant. For NT, don't use the stack probe
......
...@@ -1879,14 +1879,19 @@ load_pic_register (do_rtl) ...@@ -1879,14 +1879,19 @@ load_pic_register (do_rtl)
{ {
emit_insn (gen_prologue_get_pc (xops[0], xops[1])); emit_insn (gen_prologue_get_pc (xops[0], xops[1]));
emit_insn (gen_prologue_set_got (xops[0], emit_insn (gen_prologue_set_got (xops[0],
gen_rtx (SYMBOL_REF, Pmode, #ifdef YES_UNDERSCORES
"$_GLOBAL_OFFSET_TABLE_"), gen_rtx_SYMBOL_REF (Pmode,
"$__GLOBAL_OFFSET_TABLE_"),
#else
gen_rtx_SYMBOL_REF (Pmode,
"$_GLOBAL_OFFSET_TABLE_"),
#endif
xops[1])); xops[1]));
} }
else else
{ {
output_asm_insn (AS1 (call,%X1), 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;
} }
} }
...@@ -1909,7 +1914,7 @@ load_pic_register (do_rtl) ...@@ -1909,7 +1914,7 @@ load_pic_register (do_rtl)
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (xops[1])); CODE_LABEL_NUMBER (xops[1]));
output_asm_insn (AS1 (pop%L0,%0), xops); output_asm_insn (AS1 (pop%L0,%0), xops);
output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_+[.-%P1],%0", xops); output_asm_insn ("addl $%__GLOBAL_OFFSET_TABLE_+[.-%P1],%0", xops);
} }
} }
...@@ -3372,7 +3377,8 @@ put_condition_code (code, reverse_cc, mode, file) ...@@ -3372,7 +3377,8 @@ put_condition_code (code, reverse_cc, mode, file)
k -- likewise, print the SImode name of the register. k -- likewise, print the SImode name of the register.
h -- print the QImode name for a "high" register, either ah, bh, ch or dh. h -- print the QImode name for a "high" register, either ah, bh, ch or dh.
y -- print "st(0)" instead of "st" as a register. y -- print "st(0)" instead of "st" as a register.
P -- print as a PIC constant */ P -- print as a PIC constant
_ -- output "_" if YES_UNDERSCORES */
void void
print_operand (file, x, code) print_operand (file, x, code)
...@@ -3389,6 +3395,12 @@ print_operand (file, x, code) ...@@ -3389,6 +3395,12 @@ print_operand (file, x, code)
putc ('*', file); putc ('*', file);
return; return;
case '_':
#ifdef YES_UNDERSCORES
putc ('_', file);
#endif
return;
case 'L': case 'L':
PUT_OP_SIZE (code, 'l', file); PUT_OP_SIZE (code, 'l', file);
return; return;
......
...@@ -2578,7 +2578,7 @@ do { long l; \ ...@@ -2578,7 +2578,7 @@ do { long l; \
F,f -- likewise, but for floating-point. */ F,f -- likewise, but for floating-point. */
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \ #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
((CODE) == '*') ((CODE) == '*' || (CODE) == '_')
/* Print the name of a register based on its machine mode and number. /* Print the name of a register based on its machine mode and number.
If CODE is 'w', pretend the mode is HImode. If CODE is 'w', pretend the mode is HImode.
......
...@@ -6894,7 +6894,7 @@ byte_xor_operation: ...@@ -6894,7 +6894,7 @@ byte_xor_operation:
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_+[.-%X1],%0\", operands); output_asm_insn (\"addl $%__GLOBAL_OFFSET_TABLE_+[.-%X1],%0\", operands);
RET; RET;
}" }"
[(set_attr "memory" "none")]) [(set_attr "memory" "none")])
......
...@@ -176,7 +176,7 @@ do { \ ...@@ -176,7 +176,7 @@ do { \
output_asm_insn (AS1 (call,%P1), xops); \ output_asm_insn (AS1 (call,%P1), xops); \
ASM_OUTPUT_INTERNAL_LABEL (FILE, "L", CODE_LABEL_NUMBER (xops[1])); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "L", CODE_LABEL_NUMBER (xops[1])); \
output_asm_insn (AS1 (pop%L0,%0), xops); \ output_asm_insn (AS1 (pop%L0,%0), xops); \
output_asm_insn ("addl $_GLOBAL_OFFSET_TABLE_+[.-%P1],%0", xops); \ output_asm_insn ("addl $%__GLOBAL_OFFSET_TABLE_+[.-%P1],%0", xops); \
fprintf (FILE, "\tmovl "); \ fprintf (FILE, "\tmovl "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "@GOT(%%ebx),%%ecx\n\tpopl %%ebx\n\tjmp *%%ecx\n"); \ fprintf (FILE, "@GOT(%%ebx),%%ecx\n\tpopl %%ebx\n\tjmp *%%ecx\n"); \
......
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