diff options
Diffstat (limited to 'none/tests/arm64/memory.c')
-rw-r--r-- | none/tests/arm64/memory.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/none/tests/arm64/memory.c b/none/tests/arm64/memory.c index 1b3eb402f..6034807b5 100644 --- a/none/tests/arm64/memory.c +++ b/none/tests/arm64/memory.c @@ -6,6 +6,7 @@ #include <stdio.h> #include <malloc.h> // memalign #include <string.h> // memset +#include "tests/malloc.h" #include <assert.h> typedef unsigned char UChar; @@ -20,16 +21,6 @@ typedef unsigned char Bool; #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; @@ -1600,6 +1591,23 @@ printf("PRFM (immediate)\n"); MEM_TEST("prfm pldl1keep, [x5, #40]", 12, -4); MEM_TEST("prfm pstl3strm, [x5, #56]", 12, -4); +//////////////////////////////////////////////////////////////// +printf("PRFM (register)\n"); + +MEM_TEST("prfm pldl1keep, [x5,x6]", 12, -4); +MEM_TEST("prfm pldl1strm, [x5,x6, lsl #3]", 12, -4); +MEM_TEST("prfm pldl2keep, [x5,w6,uxtw #0]", 12, 4); +MEM_TEST("prfm pldl2strm, [x5,w6,uxtw #3]", 12, 4); +MEM_TEST("prfm pldl3keep, [x5,w6,sxtw #0]", 12, 4); +MEM_TEST("prfm pldl3strm, [x5,w6,sxtw #3]", 12, -4); + +MEM_TEST("prfm pstl1keep, [x5,x6]", 12, -4); +MEM_TEST("prfm pstl1strm, [x5,x6, lsl #3]", 12, -4); +MEM_TEST("prfm pstl2keep, [x5,w6,uxtw #0]", 12, 4); +MEM_TEST("prfm pstl2strm, [x5,w6,uxtw #3]", 12, 4); +MEM_TEST("prfm pstl3keep, [x5,w6,sxtw #0]", 12, 4); +MEM_TEST("prfm pstl3strm, [x5,w6,sxtw #3]", 12, -4); + } /* end of test_memory2() */ //////////////////////////////////////////////////////////////// |