Commit 9ac7ebba by Kazu Hirata Committed by Kazu Hirata

h8300.c (const_costs): Remove a warning.

	* config/h8300/h8300.c (const_costs): Remove a warning.
	(output_plussi): Likewise.
	(compute_plussi_length): Likewise.
	(compute_plussi_cc): Likewise.

From-SVN: r61531
parent 309c52b5
2003-01-20 Kazu Hirata <kazu@cs.umass.edu> 2003-01-20 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (const_costs): Remove a warning.
(output_plussi): Likewise.
(compute_plussi_length): Likewise.
(compute_plussi_cc): Likewise.
2003-01-20 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (addsi_h8300): Remove the last * config/h8300/h8300.md (addsi_h8300): Remove the last
alternative. alternative.
......
...@@ -1106,7 +1106,12 @@ const_costs (r, c, outer_code) ...@@ -1106,7 +1106,12 @@ const_costs (r, c, outer_code)
switch (c) switch (c)
{ {
case CONST_INT: case CONST_INT:
switch (INTVAL (r)) {
HOST_WIDE_INT n = INTVAL (r);
if (-4 <= n || n <= 4)
{
switch ((int) n)
{ {
case 0: case 0:
return 0; return 0;
...@@ -1121,7 +1126,8 @@ const_costs (r, c, outer_code) ...@@ -1121,7 +1126,8 @@ const_costs (r, c, outer_code)
return 0 + (outer_code == SET); return 0 + (outer_code == SET);
else else
return 1; return 1;
default: }
}
return 1; return 1;
} }
...@@ -1908,7 +1914,7 @@ output_plussi (operands) ...@@ -1908,7 +1914,7 @@ output_plussi (operands)
/* See if we can finish with 2 bytes. */ /* See if we can finish with 2 bytes. */
switch (intval & 0xffffffff) switch ((unsigned int) intval & 0xffffffff)
{ {
case 0x00000001: case 0x00000001:
case 0x00000002: case 0x00000002:
...@@ -1968,7 +1974,7 @@ compute_plussi_length (operands) ...@@ -1968,7 +1974,7 @@ compute_plussi_length (operands)
/* See if we can finish with 2 bytes. */ /* See if we can finish with 2 bytes. */
switch (intval & 0xffffffff) switch ((unsigned int) intval & 0xffffffff)
{ {
case 0x00000001: case 0x00000001:
case 0x00000002: case 0x00000002:
...@@ -2023,7 +2029,7 @@ compute_plussi_cc (operands) ...@@ -2023,7 +2029,7 @@ compute_plussi_cc (operands)
/* See if we can finish with 2 bytes. */ /* See if we can finish with 2 bytes. */
switch (intval & 0xffffffff) switch ((unsigned int) intval & 0xffffffff)
{ {
case 0x00000001: case 0x00000001:
case 0x00000002: case 0x00000002:
......
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