jit: Be very clear on sign extension.

This commit is contained in:
Unknown W. Brackets 2021-01-30 11:40:32 -08:00
parent e397754587
commit e99c69f19e
5 changed files with 5 additions and 5 deletions

View File

@ -49,7 +49,7 @@
#define _SIZE ((op>>11) & 0x1F)
#define _IMM16 (signed short)(op & 0xFFFF)
#define _IMM26 (op & 0x03FFFFFF)
#define TARGET16 ((int)((uint32_t)_IMM16 << 2))
#define TARGET16 ((int)((uint32_t)(int)_IMM16 << 2))
#define TARGET26 (_IMM26 << 2)
#define LOOPOPTIMIZATION 0

View File

@ -49,7 +49,7 @@
#define _SIZE ((op>>11) & 0x1F)
#define _IMM16 (signed short)(op & 0xFFFF)
#define _IMM26 (op & 0x03FFFFFF)
#define TARGET16 ((int)((uint32_t)_IMM16 << 2))
#define TARGET16 ((int)((uint32_t)(int)_IMM16 << 2))
#define TARGET26 (_IMM26 << 2)
#define LOOPOPTIMIZATION 0

View File

@ -42,7 +42,7 @@
#define _SIZE ((op>>11) & 0x1F)
#define _IMM16 (signed short)(op & 0xFFFF)
#define _IMM26 (op & 0x03FFFFFF)
#define TARGET16 ((int)((uint32_t)_IMM16 << 2))
#define TARGET16 ((int)((uint32_t)(int)_IMM16 << 2))
#define TARGET26 (_IMM26 << 2)
#define LOOPOPTIMIZATION 0

View File

@ -30,7 +30,7 @@ namespace MIPSCodeUtils
#define _RT ((op>>16) & 0x1F)
#define _IMM16 (signed short)(op & 0xFFFF)
#define _IMM26 (op & 0x03FFFFFF)
#define TARGET16 ((int)((uint32_t)_IMM16 << 2))
#define TARGET16 ((int)((uint32_t)(int)_IMM16 << 2))
#define TARGET26 (_IMM26 << 2)
u32 GetJumpTarget(u32 addr) {

View File

@ -48,7 +48,7 @@
#define _SIZE ((op>>11) & 0x1F)
#define _IMM16 (signed short)(op & 0xFFFF)
#define _IMM26 (op & 0x03FFFFFF)
#define TARGET16 ((int)((uint32_t)_IMM16 << 2))
#define TARGET16 ((int)((uint32_t)(int)_IMM16 << 2))
#define TARGET26 (_IMM26 << 2)
#define LOOPOPTIMIZATION 0