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:
cuz
2003-10-10 11:39:58 +00:00
parent f1b0fb9763
commit f9af6ebf88

View File

@@ -272,6 +272,9 @@ unsigned sizeofarg (unsigned flags)
case CF_LONG: case CF_LONG:
return 4; return 4;
case CF_FLOAT:
return 4;
default: default:
typeerror (flags); typeerror (flags);
/* NOTREACHED */ /* 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 /* 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); g_push (flags & ~CF_CONST, 0);
} }
/* Use long way over the stack */ /* 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 /* 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); g_push (flags & ~CF_CONST, 0);
} }
/* Use long way over the stack */ /* 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 /* 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); g_push (flags & ~CF_CONST, 0);
} }
/* Use long way over the stack */ /* 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 /* 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); g_push (flags & ~CF_CONST, 0);
} }
/* Use long way over the stack */ /* 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 /* 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); g_push (flags & ~CF_CONST, 0);
} }
/* Use long way over the stack */ /* 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 /* 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); g_push (flags & ~CF_CONST, 0);
} }
/* Use long way over the stack */ /* Use long way over the stack */