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] shadow-cpu-h defines shadow-edge twice (and differently) #1081

Closed
xTVaser opened this issue Jan 16, 2022 · 1 comment
Closed

[decomp] shadow-cpu-h defines shadow-edge twice (and differently) #1081

xTVaser opened this issue Jan 16, 2022 · 1 comment
Labels
decompiler Decompiler Related

Comments

@xTVaser
Copy link
Member

xTVaser commented Jan 16, 2022

Kinda interesting...I presume in the original code, the second definition won out, but our decompiler/compiler doesn't handle this very well

lw v1, type(s7)           ;; [118] (set! v1-11 type) [] -> [v1: <the etype type> ]
    lwu t9, 16(v1)            ;; [119] (set! t9-21 (l.wu (+ v1-11 16)))
                              ;; [v1: <the etype type> ] -> [t9: (function symbol type int type) ]
    daddiu a0, s7, shadow-edge;; [120] (set! a0-21 'shadow-edge) [] -> [a0: symbol ]
    lw a1, structure(s7)      ;; [121] (set! a1-21 structure) [] -> [a1: <the etype structure> ]
    ld a2, L94(fp)            ;; [122] (set! a2-20 (l.d L94)) [] -> [a2: uint ]
    jalr ra, t9               ;; [123] (call! a0-21 a1-21 a2-20)
...
lw v1, type(s7)           ;; [140] (set! v1-13 type) [] -> [v1: <the etype type> ]
    lwu t9, 16(v1)            ;; [141] (set! t9-25 (l.wu (+ v1-13 16)))
                              ;; [v1: <the etype type> ] -> [t9: (function symbol type int type) ]
    daddiu a0, s7, shadow-edge;; [142] (set! a0-25 'shadow-edge) [] -> [a0: symbol ]
    lw a1, structure(s7)      ;; [143] (set! a1-25 structure) [] -> [a1: <the etype structure> ]
    ld a2, L97(fp)            ;; [144] (set! a2-24 (l.d L97)) [] -> [a2: uint ]
    jalr ra, t9               ;; [145] (call! a0-25 a1-25 a2-24)
                              ;; [a0: symbol a1: <the etype structure> a2: uint t9: (function symbol type int type) ] -> [v0: type ]
@xTVaser xTVaser changed the title [decomp] shadow-cpu-h defines shadow-edge differently, twice [decomp] shadow-cpu-h defines shadow-edge twice (and differently) Jan 16, 2022
@xTVaser xTVaser added the decompiler Decompiler Related label Feb 12, 2022
@water111
Copy link
Collaborator

I worked around this in #1246
It's not ideal, but I don't think it's worth the effort to fix because it happened only once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decompiler Decompiler Related
Projects
None yet
Development

No branches or pull requests

2 participants