mirror of
https://git.wuffs.org/MWCC
synced 2025-12-16 00:17:09 +00:00
fix lots more issues, add endian conversions to ObjGenMachO, add 64-bit kludge to Switch.c
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -17,6 +17,7 @@ typedef enum {
|
||||
PCOp_PLACEHOLDEROPERAND
|
||||
} PCOpKind;
|
||||
|
||||
// unify me with RefType?
|
||||
typedef enum {
|
||||
PCOpMemory0 = 0,
|
||||
PCOpMemory1 = 1
|
||||
|
||||
Reference in New Issue
Block a user