Commit 212bc5fa by Alexandre Oliva Committed by Alexandre Oliva

mn10300.md (movdi, movdf): 64-bit clean-up.

* config/mn10300/mn10300.md (movdi, movdf): 64-bit clean-up.
* config/mn10300/mn10300.c (print_operand): Likewise.

From-SVN: r34062
parent 7f251dee
2000-05-20 Alexandre Oliva <aoliva@cygnus.com> 2000-05-20 Alexandre Oliva <aoliva@cygnus.com>
* config/mn10300/mn10300.md (movdi, movdf): 64-bit clean-up.
* config/mn10300/mn10300.c (print_operand): Likewise.
* final.c (split_double): Right shift of negative values is not * final.c (split_double): Right shift of negative values is not
portable. portable.
...@@ -177,8 +177,12 @@ print_operand (file, x, code) ...@@ -177,8 +177,12 @@ print_operand (file, x, code)
} }
case CONST_INT: case CONST_INT:
print_operand_address (file, x); {
rtx low, high;
split_double (x, &low, &high);
fprintf (file, "%ld", (long)INTVAL (low));
break; break;
}
default: default:
abort (); abort ();
...@@ -231,11 +235,13 @@ print_operand (file, x, code) ...@@ -231,11 +235,13 @@ print_operand (file, x, code)
} }
case CONST_INT: case CONST_INT:
if (INTVAL (x) < 0) {
print_operand_address (file, GEN_INT (-1)); rtx low, high;
else split_double (x, &low, &high);
print_operand_address (file, GEN_INT (0)); fprintf (file, "%ld", (long)INTVAL (high));
break; break;
}
default: default:
abort (); abort ();
} }
......
...@@ -419,8 +419,10 @@ ...@@ -419,8 +419,10 @@
case 11: case 11:
if (GET_CODE (operands[1]) == CONST_INT) if (GET_CODE (operands[1]) == CONST_INT)
{ {
val[0] = INTVAL (operands[1]); rtx low, high;
val[1] = val[0] < 0 ? -1 : 0; split_double (operands[1], &low, &high);
val[0] = INTVAL (low);
val[1] = INTVAL (high);
} }
if (GET_CODE (operands[1]) == CONST_DOUBLE) if (GET_CODE (operands[1]) == CONST_DOUBLE)
{ {
...@@ -567,8 +569,10 @@ ...@@ -567,8 +569,10 @@
case 11: case 11:
if (GET_CODE (operands[1]) == CONST_INT) if (GET_CODE (operands[1]) == CONST_INT)
{ {
val[0] = INTVAL (operands[1]); rtx low, high;
val[1] = val[0] < 0 ? -1 : 0; split_double (operands[1], &low, &high);
val[0] = INTVAL (low);
val[1] = INTVAL (high);
} }
if (GET_CODE (operands[1]) == CONST_DOUBLE) if (GET_CODE (operands[1]) == CONST_DOUBLE)
{ {
......
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