diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-13 01:38:15 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-13 01:38:15 +0000 |
commit | 08d21a052b9afc37292ec3fad390502610e2cb32 (patch) | |
tree | 270737c790f5d1bb05f68498f8233640ada6a0c5 /includes/compiler | |
parent | 54628993e0038c7bea9c064491974985b6699502 (diff) | |
parent | 9d985413ce2b60a1a8cf001913ee8dac81c03aac (diff) | |
download | MWCC-08d21a052b9afc37292ec3fad390502610e2cb32.tar.gz MWCC-08d21a052b9afc37292ec3fad390502610e2cb32.zip |
Merge remote-tracking branch 'origin/main'
Diffstat (limited to 'includes/compiler')
-rw-r--r-- | includes/compiler/CompilerTools.h | 18 | ||||
-rw-r--r-- | includes/compiler/PCodeInfo.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/includes/compiler/CompilerTools.h b/includes/compiler/CompilerTools.h index b218925..1338f29 100644 --- a/includes/compiler/CompilerTools.h +++ b/includes/compiler/CompilerTools.h @@ -3,6 +3,10 @@ #include "compiler/common.h" +#ifdef __LITTLE_ENDIAN__ +#define ENDIAN_CONVERSION +#endif + extern void CompilerGetPString(short index, unsigned char *string); extern void CompilerGetCString(short index, char *string); extern unsigned char *CTool_CtoPstr(char *cstr); @@ -49,6 +53,20 @@ struct GList { extern long hash_name_id; extern HashNameNode **name_hash_nodes; + +#ifdef __LP64__ +#define CW_64_BIT_SUPPORT +#endif + +// These don't exist in the original source, but are kind of necessary in the 2020s +#ifdef CW_64_BIT_SUPPORT +extern void *CTool_ResolveIndexToPointer(UInt32 index); +extern UInt32 CTool_CreateIndexFromPointer(void *ptr); +#else +#define CTool_ResolveIndexToPointer(index) ((void *) (index)) +#define CTool_CreateIndexFromPointer(ptr) ((UInt32) (ptr)) +#endif + extern void (*GListErrorProc)(void); extern short InitGList(GList *gl, SInt32 size); diff --git a/includes/compiler/PCodeInfo.h b/includes/compiler/PCodeInfo.h index 330a422..bc29b26 100644 --- a/includes/compiler/PCodeInfo.h +++ b/includes/compiler/PCodeInfo.h @@ -17,6 +17,7 @@ typedef enum { PCOp_PLACEHOLDEROPERAND } PCOpKind; +// unify me with RefType? typedef enum { PCOpMemory0 = 0, PCOpMemory1 = 1 |