FreeBSD: add file descriptor tracking for _umtx_op
[valgrind.git] / none / tests / mips64 / unaligned_load.c
blob550b66062dfe1a0e102ba89b03905aa46c47224d
1 #include <stdio.h>
3 #define N 15
4 #define SOLL 8 /* size of unsigned long long */
6 unsigned long long memSrc[] = {
7 0x12345658121f1e1f, 0,
8 3, -1,
9 0x232f2e2f56568441, 0x242c2b2b1236548c,
10 0xffffffff252a2e2b, 0x262d2d2a4521dddd,
11 0x3f343f3e22222222, 0x3e353d3c41231548,
12 0x363a3c3b45421212, 0x3b373b3a4545afcb,
13 0x454f4e4556984525, 0xfffffffffffffffc,
14 0x474d474c55aaaaaa, 0x4a484a4c65665659
17 int main()
19 int i, index;
20 unsigned long long outLoad;
21 #if (__mips_isa_rev < 6)
22 for (i = 8; i < N * SOLL ; i++) {
23 outLoad = 0;
24 __asm__ __volatile__(
25 "move $t0, %1" "\n\t"
26 "move $t1, %2" "\n\t"
27 "daddu $t0, $t0, $t1" "\n\t"
28 "move $t1, $zero" "\n\t"
29 "ldl $t1, 0($t0)" "\n\t"
30 "ldr $t1, 7($t0)" "\n\t"
31 "move %0, $t1" "\n\t"
32 : "=r" (outLoad)
33 : "r" (memSrc), "r" (i)
34 : "t0", "t1"
36 index = (i / SOLL) % N;
37 printf("i: %d, memSrc[%d]: 0x%llx, outLoad: 0x%llx\n",
38 i, index, memSrc[index], outLoad);
40 #endif
41 return 0;