Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[decomp] Creation of s6-n from no where, results in un-compilable code #910

Closed
xTVaser opened this issue Oct 17, 2021 · 1 comment · Fixed by #1018
Closed

[decomp] Creation of s6-n from no where, results in un-compilable code #910

xTVaser opened this issue Oct 17, 2021 · 1 comment · Fixed by #1018

Comments

@xTVaser
Copy link
Member

xTVaser commented Oct 17, 2021

A bit hard to describe, but there are very few functions where s6 gets assigned to another variable for some reason -- despite there being no set! that i can find.

I'll use (code robber-debug) in rolling-robber, label L76 as an example.

    c.lt.s f0, f1             ;; [ 69] (b! (>=.s f0-11 f1-0) L82 (set! v1-24 #f)) [] -> [v1: '#f ]
    bc1f L82
    or v1, s7, r0

B8:
    lwc1 f0, L183(fp)         ;; [ 70] (set! f0-12 (l.f L183)) [] -> []
    lwc1 f1, 172(s6)          ;; [ 71] (set! f1-1 (l.f (+ self 172))) [s6: robber ] -> []
    add.s f0, f0, f1          ;; [ 72] (set! f0-13 (+.s f0-12 f1-1)) [] -> []
    swc1 f0, 172(s6)          ;; [ 73] (s.f! (+ self 172) f0-13) [s6: robber ] -> []
    mfc1 v1, f0               ;; [ 74] (set! v1-25 (fpr->gpr f0-13)) [] -> [v1: float ]
    beq r0, r0, L83           ;; [ 75] (b! #t L83 (nop!)) [] -> []
    sll r0, r0, 0

B9:
L82:
    lwc1 f0, 172(s6)          ;; [ 76] (set! f0-14 (l.f (+ self 172))) [s6: robber ] -> []
    mtc1 f1, r0               ;; [ 77] (set! f1-2 0) [] -> []
    c.lt.s f0, f1             ;; [ 78] (b! (>=.s f0-14 f1-2) L83 (set! v1-26 #f)) [] -> [v1: '#f ]
    bc1f L83
    or v1, s7, r0

B10:
    lwc1 f0, L187(fp)         ;; [ 79] (set! f0-15 (l.f L187)) [] -> []
    lwc1 f1, 172(s6)          ;; [ 80] (set! f1-3 (l.f (+ s6-1 172))) [s6: robber ] -> []
    add.s f0, f0, f1          ;; [ 81] (set! f0-16 (+.s f0-15 f1-3)) [] -> []
    swc1 f0, 172(s6)          ;; [ 82] (s.f! (+ s6-1 172) f0-16) [s6: robber ] -> []
    mfc1 v1, f0               ;; [ 83] (set! v1-27 (fpr->gpr f0-16)) [] -> [v1: float ]

In B10 it uses s6-1, which results in the following expressions:

((< (-> self curve-position) 0.0)
                                         (set!
                                          (-> s6-1 curve-position)
                                          (+ 1.0 (-> s6-1 curve-position))
                                          )
                                         )
                                        )

Which does not have the proper self syntax, and fails to compile.

This also effects the following files:

@xTVaser
Copy link
Member Author

xTVaser commented Dec 15, 2021

Atleast fixed enough to no longer be a blocker in the above mentioned PR

@xTVaser xTVaser closed this as completed Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant