case CF_LONG:
return 4;
+ case CF_FLOAT:
+ return 4;
+
default:
typeerror (flags);
/* NOTREACHED */
switch (flags & CF_TYPE) {
case CF_CHAR:
- if (flags & CF_FORCECHAR) {
- AddCodeLine ("cmp #$%02X", (unsigned char)val);
- AddCodeLine ("jsr booleq");
- return;
- }
+ if (flags & CF_FORCECHAR) {
+ AddCodeLine ("cmp #$%02X", (unsigned char)val);
+ AddCodeLine ("jsr booleq");
+ return;
+ }
/* FALLTHROUGH */
case CF_INT:
- L = GetLocalLabel();
+ L = GetLocalLabel();
AddCodeLine ("cpx #$%02X", (unsigned char)(val >> 8));
AddCodeLine ("bne %s", LocalLabelName (L));
AddCodeLine ("cmp #$%02X", (unsigned char)val);
- g_defcodelabel (L);
+ g_defcodelabel (L);
AddCodeLine ("jsr booleq");
return;
}
/* 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.
*/
- g_push (flags & ~CF_CONST, 0);
-
+ flags &= ~CF_FORCECHAR;
+ g_push (flags & ~CF_CONST, 0);
}
/* Use long way over the stack */
}
/* 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.
*/
- g_push (flags & ~CF_CONST, 0);
-
+ flags &= ~CF_FORCECHAR;
+ g_push (flags & ~CF_CONST, 0);
}
/* Use long way over the stack */
}
- /* If we go here, we didn't emit code. Push the lhs on stack and fall
- * into the normal, non-optimized stuff.
- */
- g_push (flags & ~CF_CONST, 0);
-
+ /* If we go here, we didn't emit code. Push the lhs on stack and fall
+ * 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 */
}
/* 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.
*/
- g_push (flags & ~CF_CONST, 0);
-
+ flags &= ~CF_FORCECHAR;
+ g_push (flags & ~CF_CONST, 0);
}
/* Use long way over the stack */
}
/* 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.
*/
- g_push (flags & ~CF_CONST, 0);
-
+ flags &= ~CF_FORCECHAR;
+ g_push (flags & ~CF_CONST, 0);
}
/* Use long way over the stack */
}
- /* If we go here, we didn't emit code. Push the lhs on stack and fall
- * into the normal, non-optimized stuff.
- */
- g_push (flags & ~CF_CONST, 0);
-
+ /* If we go here, we didn't emit code. Push the lhs on stack and fall
+ * 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 */