Commit 76229ac8 by Richard Kenner

(print_operand): Convert fprintf of single letters to putc and convert fprintf…

(print_operand): Convert fprintf of single letters to putc and convert fprintf of constant strings to fputs.

(print_operand): Convert fprintf of single letters to putc and convert
fprintf of constant strings to fputs.
Output '%u' operand as hexadecimal.

From-SVN: r5260
parent b839fb3f
...@@ -740,12 +740,12 @@ print_operand (file, x, code) ...@@ -740,12 +740,12 @@ print_operand (file, x, code)
case 'A': case 'A':
/* If X is a constant integer whose low-order 5 bits are zero, /* If X is a constant integer whose low-order 5 bits are zero,
write 'l'. Otherwise, write 'r'. This is a kludge to fix a bug write 'l'. Otherwise, write 'r'. This is a kludge to fix a bug
in the RS/6000 assembler where "sri" with a zero shift count in the AIX assembler where "sri" with a zero shift count
write a trash instruction. */ write a trash instruction. */
if (GET_CODE (x) == CONST_INT && (INTVAL (x) & 31) == 0) if (GET_CODE (x) == CONST_INT && (INTVAL (x) & 31) == 0)
fprintf (file, "l"); putc ('l', file);
else else
fprintf (file, "r"); putc ('r', file);
return; return;
case 'b': case 'b':
...@@ -824,9 +824,9 @@ print_operand (file, x, code) ...@@ -824,9 +824,9 @@ print_operand (file, x, code)
if (GET_CODE (x) != CONST_INT) if (GET_CODE (x) != CONST_INT)
output_operand_lossage ("invalid %%G value"); output_operand_lossage ("invalid %%G value");
else if (INTVAL (x) >= 0) else if (INTVAL (x) >= 0)
fprintf (file, "z"); putc ('z', file);
else else
fprintf (file, "m"); putc ('m', file);
return; return;
case 'h': case 'h':
...@@ -849,7 +849,7 @@ print_operand (file, x, code) ...@@ -849,7 +849,7 @@ print_operand (file, x, code)
case 'I': case 'I':
/* Print `i' if this is a constant, else nothing. */ /* Print `i' if this is a constant, else nothing. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, "i"); putc ('i', file);
return; return;
case 'j': case 'j':
...@@ -945,7 +945,7 @@ print_operand (file, x, code) ...@@ -945,7 +945,7 @@ print_operand (file, x, code)
the right. */ the right. */
if ((val & 1) && val >= 0) if ((val & 1) && val >= 0)
{ {
fprintf (file, "31"); fputs ("31", file);
return; return;
} }
else if ((val & 1) == 0) else if ((val & 1) == 0)
...@@ -1040,9 +1040,9 @@ print_operand (file, x, code) ...@@ -1040,9 +1040,9 @@ print_operand (file, x, code)
|| GET_CODE (x) == EQ || GET_CODE (x) == EQ
|| GET_CODE (x) == LT || GET_CODE (x) == GT || GET_CODE (x) == LT || GET_CODE (x) == GT
|| GET_CODE (x) == LTU || GET_CODE (x) == GTU) || GET_CODE (x) == LTU || GET_CODE (x) == GTU)
fprintf (file, "12"); fputs ("12", file);
else else
fprintf (file, "4"); putc ('4', file);
return; return;
case 'T': case 'T':
...@@ -1056,9 +1056,9 @@ print_operand (file, x, code) ...@@ -1056,9 +1056,9 @@ print_operand (file, x, code)
|| GET_CODE (x) == EQ || GET_CODE (x) == EQ
|| GET_CODE (x) == LT || GET_CODE (x) == GT || GET_CODE (x) == LT || GET_CODE (x) == GT
|| GET_CODE (x) == LTU || GET_CODE (x) == GTU) || GET_CODE (x) == LTU || GET_CODE (x) == GTU)
fprintf (file, "4"); putc ('4', file);
else else
fprintf (file, "12"); fputs ("12", file);
return; return;
case 'u': case 'u':
...@@ -1066,7 +1066,7 @@ print_operand (file, x, code) ...@@ -1066,7 +1066,7 @@ print_operand (file, x, code)
if (! INT_P (x)) if (! INT_P (x))
output_operand_lossage ("invalid %%u value"); output_operand_lossage ("invalid %%u value");
fprintf (file, "%d", (INT_LOWPART (x) >> 16) & 0xffff); fprintf (file, "0x%x", (INT_LOWPART (x) >> 16) & 0xffff);
return; return;
case 'U': case 'U':
...@@ -1074,7 +1074,7 @@ print_operand (file, x, code) ...@@ -1074,7 +1074,7 @@ print_operand (file, x, code)
if (GET_CODE (x) == MEM if (GET_CODE (x) == MEM
&& (GET_CODE (XEXP (x, 0)) == PRE_INC && (GET_CODE (XEXP (x, 0)) == PRE_INC
|| GET_CODE (XEXP (x, 0)) == PRE_DEC)) || GET_CODE (XEXP (x, 0)) == PRE_DEC))
fprintf (file, "u"); putc ('u', file);
return; return;
case 'w': case 'w':
...@@ -1099,7 +1099,7 @@ print_operand (file, x, code) ...@@ -1099,7 +1099,7 @@ print_operand (file, x, code)
case 'X': case 'X':
if (GET_CODE (x) == MEM if (GET_CODE (x) == MEM
&& LEGITIMATE_INDEXED_ADDRESS_P (XEXP (x, 0))) && LEGITIMATE_INDEXED_ADDRESS_P (XEXP (x, 0)))
fprintf (file, "x"); putc ('x', file);
return; return;
case 'Y': case 'Y':
...@@ -1123,7 +1123,7 @@ print_operand (file, x, code) ...@@ -1123,7 +1123,7 @@ print_operand (file, x, code)
if (GET_CODE (x) != SYMBOL_REF) if (GET_CODE (x) != SYMBOL_REF)
abort (); abort ();
fprintf (file, "."); putc ('.', file);
RS6000_OUTPUT_BASENAME (file, XSTR (x, 0)); RS6000_OUTPUT_BASENAME (file, XSTR (x, 0));
return; return;
......
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