mirror of
https://github.com/N64Recomp/N64Recomp.git
synced 2025-05-21 10:55:00 +00:00
Implemented jal function lookup
This commit is contained in:
parent
8a0f0da0cc
commit
84fd433dcc
4 changed files with 130 additions and 60 deletions
21
recomp.h
21
recomp.h
|
@ -3,11 +3,23 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#if 0 // treat GPRs as 32-bit, should be better codegen
|
||||
typedef uint32_t gpr;
|
||||
|
||||
#define SIGNED(val) \
|
||||
((int32_t)(val))
|
||||
#else
|
||||
typedef uint64_t gpr;
|
||||
|
||||
#define SIGNED(val) \
|
||||
((int64_t)(val))
|
||||
#endif
|
||||
|
||||
#define ADD32(a, b) \
|
||||
((uint64_t)(int32_t)((a) + (b)))
|
||||
((gpr)(int32_t)((a) + (b)))
|
||||
|
||||
#define SUB32(a, b) \
|
||||
((uint64_t)(int32_t)((a) - (b)))
|
||||
((gpr)(int32_t)((a) - (b)))
|
||||
|
||||
#define MEM_D(offset, reg) \
|
||||
(*(int64_t*)((rdram) + (((reg) + (offset)) ^ 3)))
|
||||
|
@ -36,6 +48,9 @@
|
|||
#define S64(val) \
|
||||
((int64_t)(val))
|
||||
|
||||
#define U64(val) \
|
||||
((uint64_t)(val))
|
||||
|
||||
#define MUL_S(val1, val2) \
|
||||
((val1) * (val2))
|
||||
|
||||
|
@ -66,8 +81,6 @@
|
|||
#define TRUNC_W_D(val) \
|
||||
((int32_t)(val))
|
||||
|
||||
typedef uint64_t gpr;
|
||||
|
||||
typedef union {
|
||||
double d;
|
||||
struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue