EtchedPixels / Fuzix-Compiler-Kit

Fuzix C Compiler Project
Other
45 stars 11 forks source link

In be-func-6800.c, the caller clears the stack even when the CPU is MC6800. #110

Closed zu2 closed 2 weeks ago

zu2 commented 2 weeks ago
--- ../Fuzix-Compiler-Kit/be-func-6800.c    2024-10-02 15:56:16
+++ be-func-6800.c  2024-10-10 05:45:19
@@ -213,7 +213,9 @@
        /* No helper uses varargs */
        /* FIXME: 6800 expects called code to clean up */
        sp -= s;
-       adjust_s(s, 1);
+       if(cpu != 6800){
+           adjust_s(s, 1);
+       }
        /* C style ops that are ISBOOL didn't set the bool flags */
        if (n->flags & ISBOOL)
            printf("\ttstb\n");