Commits

Stanislav Sedov committed abfb523

- Fix tests compilation.

Comments (0)

Files changed (4)

none/tests/amd64/avx-1.c

 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 typedef  unsigned char           UChar;
 typedef  unsigned int            UInt;
     \
     __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
-       Block* b = memalign(32, sizeof(Block)); \
+       Block* b; \
+       posix_memalign(&b, 32, sizeof(Block)); \
        randBlock(b); \
        printf("%s(reg)\n", #_name); \
        showBlock("before", b); \

none/tests/amd64/avx2-1.c

 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 typedef  unsigned char           UChar;
 typedef  unsigned int            UInt;
     \
     __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
-       Block* b = memalign(32, sizeof(Block)); \
+       Block* b; \
+       posix_memalign(&b, 32, sizeof(Block)); \
        randBlock(b); \
        printf("%s(reg)\n", #_name); \
        showBlock("before", b); \

none/tests/amd64/movbe.c

 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 typedef  unsigned char           UChar;
 typedef  unsigned int            UInt;
     \
     __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
-       Block* b = memalign(32, sizeof(Block)); \
+       Block* b; \
+       posix_memalign(&b, 32, sizeof(Block)); \
        randBlock(b); \
        printf("%s\n", #_name); \
        showBlock("before", b); \

none/tests/x86/movbe.c

 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
-#include <malloc.h>
+#include <stdlib.h>
 
 typedef  unsigned char           UChar;
 typedef  unsigned int            UInt;
     \
     __attribute__ ((noinline)) static void test_##_name ( void )   \
     { \
-       Block* b = memalign(32, sizeof(Block)); \
+       Block* b; \
+       posix_memalign(&b, 32, sizeof(Block)); \
        randBlock(b); \
        printf("%s\n", #_name); \
        showBlock("before", b); \