Commit 4b36ae28 by Segher Boessenkool Committed by Segher Boessenkool

rs6000.c (INT_P): Reformat.

        * config/rs6000/rs6000.c (INT_P): Reformat.  Delete obsolete comment.
        (INT_LOWPART): Delete.
        (extract_MB): Adjust.
        (extract_ME): Adjust.
        (print_operand): Adjust.

From-SVN: r198602
parent da226db2
2013-05-04 Segher Boessenkool <segher@kernel.crashing.org> 2013-05-04 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (INT_P): Reformat. Delete obsolete comment.
(INT_LOWPART): Delete.
(extract_MB): Adjust.
(extract_ME): Adjust.
(print_operand): Adjust.
2013-05-04 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/predicates.md (reg_or_add_cint_operand, * config/rs6000/predicates.md (reg_or_add_cint_operand,
reg_or_sub_cint_operand): Delete "HOST_BITS_PER_WIDE_INT == 32" case. reg_or_sub_cint_operand): Delete "HOST_BITS_PER_WIDE_INT == 32" case.
(reg_or_logical_cint_operand, easy_fp_constant, (reg_or_logical_cint_operand, easy_fp_constant,
......
...@@ -14851,17 +14851,13 @@ rs6000_init_machine_status (void) ...@@ -14851,17 +14851,13 @@ rs6000_init_machine_status (void)
return ggc_alloc_cleared_machine_function (); return ggc_alloc_cleared_machine_function ();
} }
/* These macros test for integers and extract the low-order bits. */ #define INT_P(X) (GET_CODE (X) == CONST_INT && GET_MODE (X) == VOIDmode)
#define INT_P(X) \
(GET_CODE (X) == CONST_INT && GET_MODE (X) == VOIDmode)
#define INT_LOWPART(X) INTVAL (X)
int int
extract_MB (rtx op) extract_MB (rtx op)
{ {
int i; int i;
unsigned long val = INT_LOWPART (op); unsigned long val = INTVAL (op);
/* If the high bit is zero, the value is the first 1 bit we find /* If the high bit is zero, the value is the first 1 bit we find
from the left. */ from the left. */
...@@ -14893,7 +14889,7 @@ int ...@@ -14893,7 +14889,7 @@ int
extract_ME (rtx op) extract_ME (rtx op)
{ {
int i; int i;
unsigned long val = INT_LOWPART (op); unsigned long val = INTVAL (op);
/* If the low bit is zero, the value is the first 1 bit we find from /* If the low bit is zero, the value is the first 1 bit we find from
the right. */ the right. */
...@@ -15014,7 +15010,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15014,7 +15010,7 @@ print_operand (FILE *file, rtx x, int code)
/* If constant, low-order 16 bits of constant, unsigned. /* If constant, low-order 16 bits of constant, unsigned.
Otherwise, write normally. */ Otherwise, write normally. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INT_LOWPART (x) & 0xffff); fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0xffff);
else else
print_operand (file, x, 0); print_operand (file, x, 0);
return; return;
...@@ -15022,7 +15018,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15022,7 +15018,7 @@ print_operand (FILE *file, rtx x, int code)
case 'B': case 'B':
/* If the low-order bit is zero, write 'r'; otherwise, write 'l' /* If the low-order bit is zero, write 'r'; otherwise, write 'l'
for 64-bit mask direction. */ for 64-bit mask direction. */
putc (((INT_LOWPART (x) & 1) == 0 ? 'r' : 'l'), file); putc (((INTVAL (x) & 1) == 0 ? 'r' : 'l'), file);
return; return;
/* %c is output_addr_const if a CONSTANT_ADDRESS_P, otherwise /* %c is output_addr_const if a CONSTANT_ADDRESS_P, otherwise
...@@ -15080,7 +15076,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15080,7 +15076,7 @@ print_operand (FILE *file, rtx x, int code)
/* If constant, output low-order five bits. Otherwise, write /* If constant, output low-order five bits. Otherwise, write
normally. */ normally. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INT_LOWPART (x) & 31); fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 31);
else else
print_operand (file, x, 0); print_operand (file, x, 0);
return; return;
...@@ -15089,7 +15085,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15089,7 +15085,7 @@ print_operand (FILE *file, rtx x, int code)
/* If constant, output low-order six bits. Otherwise, write /* If constant, output low-order six bits. Otherwise, write
normally. */ normally. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, HOST_WIDE_INT_PRINT_DEC, INT_LOWPART (x) & 63); fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 63);
else else
print_operand (file, x, 0); print_operand (file, x, 0);
return; return;
...@@ -15126,7 +15122,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15126,7 +15122,7 @@ print_operand (FILE *file, rtx x, int code)
if (! INT_P (x)) if (! INT_P (x))
output_operand_lossage ("invalid %%k value"); output_operand_lossage ("invalid %%k value");
else else
fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INT_LOWPART (x)); fprintf (file, HOST_WIDE_INT_PRINT_DEC, ~ INTVAL (x));
return; return;
case 'K': case 'K':
...@@ -15211,8 +15207,8 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15211,8 +15207,8 @@ print_operand (FILE *file, rtx x, int code)
case 'p': case 'p':
/* X is a CONST_INT that is a power of two. Output the logarithm. */ /* X is a CONST_INT that is a power of two. Output the logarithm. */
if (! INT_P (x) if (! INT_P (x)
|| INT_LOWPART (x) < 0 || INTVAL (x) < 0
|| (i = exact_log2 (INT_LOWPART (x))) < 0) || (i = exact_log2 (INTVAL (x))) < 0)
output_operand_lossage ("invalid %%p value"); output_operand_lossage ("invalid %%p value");
else else
fprintf (file, "%d", i); fprintf (file, "%d", i);
...@@ -15285,7 +15281,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15285,7 +15281,7 @@ print_operand (FILE *file, rtx x, int code)
if (! INT_P (x)) if (! INT_P (x))
output_operand_lossage ("invalid %%s value"); output_operand_lossage ("invalid %%s value");
else else
fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INT_LOWPART (x)) & 31); fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 31);
return; return;
case 'S': case 'S':
...@@ -15295,7 +15291,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15295,7 +15291,7 @@ print_operand (FILE *file, rtx x, int code)
if (! mask64_operand (x, DImode)) if (! mask64_operand (x, DImode))
output_operand_lossage ("invalid %%S value"); output_operand_lossage ("invalid %%S value");
uval = INT_LOWPART (x); uval = INTVAL (x);
if (uval & 1) /* Clear Left */ if (uval & 1) /* Clear Left */
{ {
...@@ -15346,7 +15342,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15346,7 +15342,7 @@ print_operand (FILE *file, rtx x, int code)
output_operand_lossage ("invalid %%u value"); output_operand_lossage ("invalid %%u value");
else else
fprintf (file, HOST_WIDE_INT_PRINT_HEX, fprintf (file, HOST_WIDE_INT_PRINT_HEX,
(INT_LOWPART (x) >> 16) & 0xffff); (INTVAL (x) >> 16) & 0xffff);
return; return;
case 'v': case 'v':
...@@ -15355,7 +15351,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15355,7 +15351,7 @@ print_operand (FILE *file, rtx x, int code)
output_operand_lossage ("invalid %%v value"); output_operand_lossage ("invalid %%v value");
else else
fprintf (file, HOST_WIDE_INT_PRINT_HEX, fprintf (file, HOST_WIDE_INT_PRINT_HEX,
(INT_LOWPART (x) >> 16) & 0xffff); (INTVAL (x) >> 16) & 0xffff);
return; return;
case 'U': case 'U':
...@@ -15411,7 +15407,7 @@ print_operand (FILE *file, rtx x, int code) ...@@ -15411,7 +15407,7 @@ print_operand (FILE *file, rtx x, int code)
normally. */ normally. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, HOST_WIDE_INT_PRINT_DEC, fprintf (file, HOST_WIDE_INT_PRINT_DEC,
((INT_LOWPART (x) & 0xffff) ^ 0x8000) - 0x8000); ((INTVAL (x) & 0xffff) ^ 0x8000) - 0x8000);
else else
print_operand (file, x, 0); print_operand (file, 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