#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-//#include "tests/malloc.h" // reenable when reintegrated
+#include "tests/malloc.h"
#include <string.h>
-
-// rmme when reintegrated
-// Allocates a 16-aligned block. Asserts if the allocation fails.
-#ifdef VGO_darwin
-#include <stdlib.h>
-#else
-#include <malloc.h>
-#endif
-__attribute__((unused))
-static void* memalign16(size_t szB)
-{
- void* x;
-#if defined(VGO_darwin)
- // Darwin lacks memalign, but its malloc is always 16-aligned anyway.
- x = malloc(szB);
-#else
- x = memalign(16, szB);
-#endif
- assert(x);
- assert(0 == ((16-1) & (unsigned long)x));
- return x;
-}
-
-
-
typedef unsigned char V128[16];
typedef unsigned int UInt;
typedef signed int Int;
#include <assert.h>
#include <malloc.h> // memalign
#include <string.h> // memset
+#include "tests/malloc.h"
#include <math.h> // isnormal
typedef unsigned char UChar;
}
}
-__attribute__((unused))
-static void* memalign16(size_t szB)
-{
- void* x;
- x = memalign(16, szB);
- assert(x);
- assert(0 == ((16-1) & (unsigned long)x));
- return x;
-}
-
static ULong dup4x16 ( UInt x )
{
ULong r = x & 0xF;
#include <stdio.h>
#include <malloc.h> // memalign
#include <string.h> // memset
+#include "tests/malloc.h"
#include <assert.h>
typedef unsigned char UChar;
#define False ((Bool)0)
#define True ((Bool)1)
-__attribute__((noinline))
-static void* memalign16(size_t szB)
-{
- void* x;
- x = memalign(16, szB);
- assert(x);
- assert(0 == ((16-1) & (unsigned long)x));
- return x;
-}
-
static inline UChar randUChar ( void )
{
static UInt seed = 80021;