Closed zu2 closed 1 week ago
diff --git a/be-codegen-6800.c b/be-codegen-6800.c
index b9bb362..166c6c8 100644
--- a/be-codegen-6800.c
+++ b/be-codegen-6800.c
@@ -905,6 +905,11 @@ unsigned do_xeqop(struct node *n, const char *op)
unsigned off;
struct node *l = n->left;
struct node *r = n->right;
+
+ /* Float always goes via the helper */
+ if (n->type == FLOAT)
+ return 0;
+
/* Handle simpler cases of -= the other way around */
if (is_simple(r) && get_size(n->type) <= 2) {
if (is_simple(l)) {
@@ -942,6 +947,8 @@ unsigned do_xeqop(struct node *n, const char *op)
unsigned do_stkeqop(struct node *n, const char *op)
{
+ if (n->type == FLOAT)
+ return 0;
if (cpu_is_09)
puts("\tpuls x");
else if (cpu_has_pshx)
should fix it I think
The first + calls the helper function __plusf. But += does long arithmetic.
-= calls negatef, then does a long addition.
do_xptrop generates the code, but I don't know where to check for FLOAT