forked from Telodendria/Cytoplasm
Allow forcing the emulation mode for testing purposes.
This commit is contained in:
parent
63f835d006
commit
e9af54e4c7
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#if 0 /* TODO REMOVE */
|
#ifndef INT64_FORCE_EMULATED
|
||||||
|
|
||||||
#define BIT64_MAX 18446744073709551615UL
|
#define BIT64_MAX 18446744073709551615UL
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ typedef signed long Int64;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* TODO REMOVE */
|
#endif /* ifndef INT64_FORCE_EMULATED */
|
||||||
|
|
||||||
#ifdef INT64_NATIVE
|
#ifdef INT64_NATIVE
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#define CYTOPLASM_UINT64_H
|
#define CYTOPLASM_UINT64_H
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* @Nm Int64
|
* @Nm UInt64
|
||||||
* @Nd Fixed-width 64 bit integers.
|
* @Nd Fixed-width 64 bit integers.
|
||||||
* @Dd August 11, 2023
|
* @Dd August 11, 2023
|
||||||
*
|
*
|
||||||
|
@ -68,9 +68,9 @@
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#define BIT64_MAX 18446744073709551615UL
|
#ifndef INT64_FORCE_EMULATED
|
||||||
|
|
||||||
/* TODO: Implement signed arithmetic */
|
#define BIT64_MAX 18446744073709551615UL
|
||||||
|
|
||||||
#if UINT_MAX == BIT64_MAX
|
#if UINT_MAX == BIT64_MAX
|
||||||
/* typedef signed int Int64; */
|
/* typedef signed int Int64; */
|
||||||
|
@ -86,6 +86,8 @@ typedef unsigned long UInt64;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* ifndef INT64_FORCE_EMULATED */
|
||||||
|
|
||||||
#ifdef UINT64_NATIVE
|
#ifdef UINT64_NATIVE
|
||||||
|
|
||||||
#define UInt64Create(high, low) (((UInt64) (high) << 32) | (low))
|
#define UInt64Create(high, low) (((UInt64) (high) << 32) | (low))
|
||||||
|
@ -209,6 +211,7 @@ extern UInt64 UInt64Not(UInt64);
|
||||||
/**
|
/**
|
||||||
* Perform a comparison of the provided 64 bit integers and return a C
|
* Perform a comparison of the provided 64 bit integers and return a C
|
||||||
* boolean that is true if and only if they are equal.
|
* boolean that is true if and only if they are equal.
|
||||||
|
*/
|
||||||
extern int UInt64Eq(UInt64, UInt64);
|
extern int UInt64Eq(UInt64, UInt64);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue