Added some code to handle floats/doubles.
Fixed code generation for compares. git-svn-id: svn://svn.cc65.org/cc65/trunk@2488 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -272,6 +272,9 @@ unsigned sizeofarg (unsigned flags)
|
||||
case CF_LONG:
|
||||
return 4;
|
||||
|
||||
case CF_FLOAT:
|
||||
return 4;
|
||||
|
||||
default:
|
||||
typeerror (flags);
|
||||
/* NOTREACHED */
|
||||
@@ -3409,10 +3412,11 @@ void g_eq (unsigned flags, unsigned long val)
|
||||
}
|
||||
|
||||
/* If we go here, we didn't emit code. Push the lhs on stack and fall
|
||||
* into the normal, non-optimized stuff.
|
||||
* into the normal, non-optimized stuff. Note: The standard stuff will
|
||||
* always work with ints.
|
||||
*/
|
||||
flags &= ~CF_FORCECHAR;
|
||||
g_push (flags & ~CF_CONST, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Use long way over the stack */
|
||||
@@ -3465,10 +3469,11 @@ void g_ne (unsigned flags, unsigned long val)
|
||||
}
|
||||
|
||||
/* If we go here, we didn't emit code. Push the lhs on stack and fall
|
||||
* into the normal, non-optimized stuff.
|
||||
* into the normal, non-optimized stuff. Note: The standard stuff will
|
||||
* always work with ints.
|
||||
*/
|
||||
flags &= ~CF_FORCECHAR;
|
||||
g_push (flags & ~CF_CONST, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Use long way over the stack */
|
||||
@@ -3546,10 +3551,11 @@ void g_lt (unsigned flags, unsigned long val)
|
||||
}
|
||||
|
||||
/* If we go here, we didn't emit code. Push the lhs on stack and fall
|
||||
* into the normal, non-optimized stuff.
|
||||
* into the normal, non-optimized stuff. Note: The standard stuff will
|
||||
* always work with ints.
|
||||
*/
|
||||
flags &= ~CF_FORCECHAR;
|
||||
g_push (flags & ~CF_CONST, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Use long way over the stack */
|
||||
@@ -3663,10 +3669,11 @@ void g_le (unsigned flags, unsigned long val)
|
||||
}
|
||||
|
||||
/* If we go here, we didn't emit code. Push the lhs on stack and fall
|
||||
* into the normal, non-optimized stuff.
|
||||
* into the normal, non-optimized stuff. Note: The standard stuff will
|
||||
* always work with ints.
|
||||
*/
|
||||
flags &= ~CF_FORCECHAR;
|
||||
g_push (flags & ~CF_CONST, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Use long way over the stack */
|
||||
@@ -3796,10 +3803,11 @@ void g_gt (unsigned flags, unsigned long val)
|
||||
}
|
||||
|
||||
/* If we go here, we didn't emit code. Push the lhs on stack and fall
|
||||
* into the normal, non-optimized stuff.
|
||||
* into the normal, non-optimized stuff. Note: The standard stuff will
|
||||
* always work with ints.
|
||||
*/
|
||||
flags &= ~CF_FORCECHAR;
|
||||
g_push (flags & ~CF_CONST, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Use long way over the stack */
|
||||
@@ -3878,10 +3886,11 @@ void g_ge (unsigned flags, unsigned long val)
|
||||
}
|
||||
|
||||
/* If we go here, we didn't emit code. Push the lhs on stack and fall
|
||||
* into the normal, non-optimized stuff.
|
||||
* into the normal, non-optimized stuff. Note: The standard stuff will
|
||||
* always work with ints.
|
||||
*/
|
||||
flags &= ~CF_FORCECHAR;
|
||||
g_push (flags & ~CF_CONST, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Use long way over the stack */
|
||||
|
||||
Reference in New Issue
Block a user