diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-10 11:05:21 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-10 11:05:21 +0000 |
commit | aec1b8dddc68ecb8288ec6132932e4c7b4bca09f (patch) | |
tree | 8138328fe43bcc5fff690dc60caac79aa570ab2b /includes/compiler/IroUtil.h | |
parent | fcfbafff31869ed808bff0639532db1828660e92 (diff) | |
download | MWCC-aec1b8dddc68ecb8288ec6132932e4c7b4bca09f.tar.gz MWCC-aec1b8dddc68ecb8288ec6132932e4c7b4bca09f.zip |
getting close to done
Diffstat (limited to 'includes/compiler/IroUtil.h')
-rw-r--r-- | includes/compiler/IroUtil.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/includes/compiler/IroUtil.h b/includes/compiler/IroUtil.h index 68d34f5..502d0cd 100644 --- a/includes/compiler/IroUtil.h +++ b/includes/compiler/IroUtil.h @@ -2,6 +2,7 @@ #define COMPILER_IROUTIL_H #include "compiler/IrOptimizer.h" +#include "compiler/CInt64.h" #include "compiler/CParser.h" #ifdef __MWERKS__ @@ -87,7 +88,7 @@ extern IROLinear *IRO_LocateFather_Cut_And_Paste(IROLinear *a, IROLinear *b); extern IROLinear *IRO_LocateFather_Cut_And_Paste_Without_Nopping(IROLinear *a, IROLinear *b); extern void IRO_ReplaceReference(IROLinear *a, Object *obj, IROLinear *b); extern void IRO_ReplaceReferenceWithNode(IROLinear *a, IROLinear *b); -extern void IRO_GetTemp(IROExpr *expr); +extern VarRecord *IRO_GetTemp(IROExpr *expr); extern IROLinear *IRO_AssignToTemp(IROExpr *expr); extern IROLinear *IRO_FindStart(IROLinear *linear); extern void IRO_DeleteCommaNode(IROLinear *linear, IROExpr *expr); @@ -99,7 +100,7 @@ typedef void (*WalkObjFunc)(Object *obj); extern void IRO_WalkExcActions(ExceptionAction *action, WalkObjFunc func); extern Boolean IRO_FunctionCallMightThrowException(IROLinear *linear); extern IROLinear *IRO_NewIntConst(CInt64 val, Type *type); -extern IROLinear *IRO_NewFloatConst(Float val, Type *type); +extern IROLinear *IRO_NewFloatConst(const Float val, Type *type); extern Boolean IRO_IsAddressMultiply(IROLinear *linear); extern void IRO_SetupForUserBreakChecking(void); extern void IRO_CheckForUserBreak(void); @@ -109,4 +110,18 @@ inline Boolean IRO_IsUnsignedType(Type *type) { return is_unsigned(type); } +// 4B4D40 +inline CInt64 IRO_MakeULong(UInt32 i) { + CInt64 val; + CInt64_SetULong(&val, i); + return val; +} + +// 4BAAA0 +inline CInt64 IRO_MakeLong(SInt32 i) { + CInt64 val; + CInt64_SetLong(&val, i); + return val; +} + #endif |