beardypig/ghidra-emotionengine

Signed value displayed in unsigned instruction

Closed this issue · 6 comments

addiu Uses an unsigned value.
image
It should display:
addiu v0,v0 0xfd80
addiu v1,v1, 0xe330

Nice catch. May you change simmed to immed in mips.sinc on lines 24 and 25, change sext to zext on line 26, and then submit a pull request please? I'm on my phone and this is a simple fix that you should get credit for.

If you may also fix the li and addu instructions as well it would be appreciated. They are right below addiu.

I'll try checking it out, hopefully I don't need a Java IDE setup

Seems like this issue also affects a bunch of other immediate unsigned instructions as well, I'll try to fix those as well

Yeah looks like that fixed it.
image
I'll be submitting my fixes as a pr soon

Closed #55

addiu Uses an unsigned value.

This is incorrect and a broken assumption for #55.

The only difference to addi is that it shouldn't cause overflow exceptions.
Otherwise it's exactly the same. There's plenty of literature on the topic, but https://webdocs.cs.ualberta.ca/~amaral/courses/229/F04/webslides/Topic6-Logic/tsld005.htm is a good summary.