totalspectrum / spin2cpp

Tool to convert Parallax Propeller Spin code to PASM, C++ or C
Other
46 stars 17 forks source link

No error for instructions with impossible flags when compiling Spin files with unused DAT section #414

Closed Wuerfel21 closed 1 year ago

Wuerfel21 commented 1 year ago

Certain instruction/flag combinations are impossible (such as BITL D,S WC or BITL D,S WZ or GETBRK D '(no flags), but flexspin doesn't error out when trying to assemble these.

totalspectrum commented 1 year ago

The getbrk d one I can reproduce (and it's easy to at least add a warning for this). bitl pa, pob wc gives me an error: modifier wc not valid for bitl.

Wuerfel21 commented 1 year ago

Remember, I'm an idiot, so there's a large possibility I messed up the testing

Wuerfel21 commented 1 year ago

Though I think I can pull out a list of instructions with funny flags, so I guess I'll go back and test them all

Wuerfel21 commented 1 year ago

Turns out I'm not stupid, I just tested it in a file with a spin main function. Unreferenced DAT sections are never compiled, etc, etc.

Probably not-a-bug.

Wuerfel21 commented 1 year ago

But GETBRK without flags should be an error because that encodes COGBRK.

totalspectrum commented 1 year ago

I've changed the missing wcz on GETBRK from a warning to an error, and did the same to modcz.

Wuerfel21 commented 1 year ago

MODCZ you can actually encode without C/Z flags (completely pointless, but whatever...)

Another one: You can't have WMLONG with an immediate D, that also doesn't error.