(print_operand, case 'h', 'H', 'w'): Minor cleanups.

From-SVN: r2168
This commit is contained in:
Richard Kenner 1992-09-19 15:41:16 -04:00
parent ef457bda4a
commit df3d94ed38

View File

@ -710,7 +710,8 @@ print_operand (file, x, code)
switch (code) switch (code)
{ {
case 'h': case 'h':
/* If constant, output low-order six bits. Otherwise, write normally. */ /* If constant, output low-order five bits. Otherwise,
write normally. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, "%d", INT_LOWPART (x) & 31); fprintf (file, "%d", INT_LOWPART (x) & 31);
else else
@ -718,7 +719,7 @@ print_operand (file, x, code)
return; return;
case 'H': case 'H':
/* X must be a constant. Output the low order 6 bits plus 24. */ /* X must be a constant. Output the low order 5 bits plus 24. */
if (! INT_P (x)) if (! INT_P (x))
output_operand_lossage ("invalid %%H value"); output_operand_lossage ("invalid %%H value");
@ -737,7 +738,8 @@ print_operand (file, x, code)
/* If constant, low-order 16 bits of constant, signed. Otherwise, write /* If constant, low-order 16 bits of constant, signed. Otherwise, write
normally. */ normally. */
if (INT_P (x)) if (INT_P (x))
fprintf (file, "%d", (INT_LOWPART (x) << 16) >> 16); fprintf (file, "%d",
(INT_LOWPART (x) & 0xffff) - 2 * (INT_LOWPART (x) & 0x8000));
else else
print_operand (file, x, 0); print_operand (file, x, 0);
return; return;