Commit eb7528db by Richard Stallman

entered into RCS

From-SVN: r899
parent 1b6c8b12
...@@ -44,11 +44,12 @@ trace (s, s1, s2) ...@@ -44,11 +44,12 @@ trace (s, s1, s2)
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
int int
hard_regno_mode_ok( regno, mode ) hard_regno_mode_ok (regno, mode)
int regno; int regno;
int mode; int mode;
{ {
switch( mode ) { switch (mode)
{
case QImode: case QImode:
case HImode: case HImode:
case PSImode: case PSImode:
...@@ -56,82 +57,55 @@ int mode; ...@@ -56,82 +57,55 @@ int mode;
case PDImode: case PDImode:
case VOIDmode: case VOIDmode:
case BLKmode: case BLKmode:
if( (regno < 8) || (regno == 16) || (regno == 17) ) { if (regno < 8 || regno == 16 || regno == 17)
return( 1 ); return 1;
} else
else { return 0;
return( 0 );
}
case DImode: case DImode:
if( (regno < 8) && ((regno & 1) == 0) ) { if (regno < 8 && (regno & 1) == 0)
return( 1 ); return 1;
} else
else { return 0;
return( 0 );
}
case SFmode: case SFmode:
case SCmode: case SCmode:
if( TARGET_32081 ) { if (TARGET_32081)
if( regno < 16 ) { {
return( 1 ); if (regno < 16)
} return 1;
else { else
return( 0 ); return 0;
}
}
else {
if( regno < 8 ) {
return( 1 );
}
else {
return( 0 );
} }
else
{
if (regno < 8)
return 1;
else
return 0;
} }
case DFmode: case DFmode:
case DCmode: case DCmode:
if( (regno & 1) == 0 ) { if ((regno & 1) == 0)
if( TARGET_32081 ) { {
if( regno < 16 ) { if (TARGET_32081)
return( 1 ); {
} if (regno < 16)
else { return 1;
return( 0 ); else
} return 0;
}
else {
if( regno < 8 ) {
return( 1 );
}
else {
return( 0 );
}
} }
else
{
if (regno < 8)
return 1;
else
return 0;
} }
else {
return( 0 );
} }
else
case XFmode: return 0;
abort( 0 );
case CCmode:
abort( 0 );
case TImode:
abort( 0 );
case XCmode:
abort( 0 );
case TFmode:
abort( 0 );
case TCmode:
abort( 0 );
default:
fprintf( stderr, "cant match mode %d\n", mode );
abort( 0 );
} }
abort(0); abort(0);
} }
...@@ -201,10 +175,17 @@ secondary_reload_class (class, mode, in) ...@@ -201,10 +175,17 @@ secondary_reload_class (class, mode, in)
if (class == GENERAL_REGS || (regno >= 0 && regno < 8)) if (class == GENERAL_REGS || (regno >= 0 && regno < 8))
return NO_REGS; return NO_REGS;
/* Constants, memory, and FP registers can go into FP registers */ /* Constants, memory, and FP registers can go into FP registers. */
if ((regno == -1 || (regno >= 8 && regno < 16)) && (class == FLOAT_REGS)) if ((regno == -1 || (regno >= 8 && regno < 16)) && (class == FLOAT_REGS))
return NO_REGS; return NO_REGS;
#if 0 /* This isn't strictly true (can't move fp to sp or vice versa),
so it's cleaner to use PREFERRED_RELOAD_CLASS
to make the right things happen. */
if (regno >= 16 && class == GEN_AND_MEM_REGS)
return NO_REGS;
#endif
/* Otherwise, we need GENERAL_REGS. */ /* Otherwise, we need GENERAL_REGS. */
return GENERAL_REGS; return GENERAL_REGS;
} }
......
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