aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@hxi.com>2002-01-21 07:06:37 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-01-21 07:06:37 +0000
commit7192cbf1e29ab55637e9f20a4a9508a46c8ec18c (patch)
tree4bb4bc5da58e1a9255426166a94e27839f1f3ac0 /gcc
parentd1552d7b014918281e1bcb68388936b68094e354 (diff)
downloadgcc-7192cbf1e29ab55637e9f20a4a9508a46c8ec18c.zip
gcc-7192cbf1e29ab55637e9f20a4a9508a46c8ec18c.tar.gz
gcc-7192cbf1e29ab55637e9f20a4a9508a46c8ec18c.tar.bz2
h8300.c (function_arg): Replace 0 with NULL_RTX as appropriate.
* config/h8300/h8300.c (function_arg): Replace 0 with NULL_RTX as appropriate. Remove redundant code. From-SVN: r49034
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/h8300/h8300.c14
2 files changed, 9 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 86b1e94..c86738f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-21 Kazu Hirata <kazu@hxi.com>
+
+ * config/h8300/h8300.c (function_arg): Replace 0 with NULL_RTX
+ as appropriate.
+ Remove redundant code.
+
2002-01-21 Joseph S. Myers <jsm28@cam.ac.uk>
* config/alpha/alpha.h, config/arc/arc.h, config/avr/avr.h,
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index db12b64..6770e03 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -825,20 +825,19 @@ function_arg (cum, mode, type, named)
tree type;
int named;
{
- rtx result = 0;
+ rtx result = NULL_RTX;
const char *fname;
int regpass = 0;
/* Never pass unnamed arguments in registers. */
if (!named)
- return 0;
+ return NULL_RTX;
/* Pass 3 regs worth of data in regs when user asked on the command line. */
if (TARGET_QUICKCALL)
regpass = 3;
/* If calling hand written assembler, use 4 regs of args. */
-
if (cum->libcall)
{
const char * const *p;
@@ -846,7 +845,6 @@ function_arg (cum, mode, type, named)
fname = XSTR (cum->libcall, 0);
/* See if this libcall is one of the hand coded ones. */
-
for (p = hand_list; *p && strcmp (*p, fname) != 0; p++)
;
@@ -863,11 +861,7 @@ function_arg (cum, mode, type, named)
else
size = GET_MODE_SIZE (mode);
- if (size + cum->nbytes > regpass * UNITS_PER_WORD)
- {
- result = 0;
- }
- else
+ if (size + cum->nbytes <= regpass * UNITS_PER_WORD)
{
switch (cum->nbytes / UNITS_PER_WORD)
{
@@ -883,8 +877,6 @@ function_arg (cum, mode, type, named)
case 3:
result = gen_rtx_REG (mode, 3);
break;
- default:
- result = 0;
}
}
}