summaryrefslogtreecommitdiff
path: root/includes/compiler/CInt64.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-12-14 00:16:59 +0000
committerAsh Wolf <ninji@wuffs.org>2022-12-14 00:16:59 +0000
commit25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22 (patch)
treec0ee632aa3752884b996c562622e2ece88216ea4 /includes/compiler/CInt64.h
parent9d2728a5605f651934fe67a6fe6986b3e4a2c011 (diff)
downloadMWCC-25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22.tar.gz
MWCC-25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22.zip
haha it's been a while since i last committed, hasn't it
Diffstat (limited to '')
-rw-r--r--includes/compiler/CInt64.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/compiler/CInt64.h b/includes/compiler/CInt64.h
index 7986a4a..dc8b51d 100644
--- a/includes/compiler/CInt64.h
+++ b/includes/compiler/CInt64.h
@@ -10,7 +10,7 @@ extern const CInt64 cint64_one;
extern const CInt64 cint64_max;
extern const CInt64 cint64_min;
-inline int CInt64_IsNegative(const CInt64 *n) {
+inline Boolean CInt64_IsNegative(const CInt64 *n) {
return (n->hi & 0x80000000) != 0;
}
inline UInt32 CInt64_GetULong(const CInt64 *n) { // 42E660 in mwcppc.exe
@@ -33,6 +33,9 @@ inline Boolean CInt64_IsZero(CInt64 *n) {
// return 0;
return n->hi == 0 && n->lo == 0;
}
+inline Boolean CInt64_IsOne(CInt64 *n) { // assumed name
+ return n->hi == 0 && n->lo == 1;
+}
inline void CInt64_Extend32(CInt64 *n) { // assumed name
n->hi = (n->lo >> 31) ? 0xFFFFFFFF : 0;
}