FreeBSD: add file descriptor tracking for _umtx_op
[valgrind.git] / none / tests / s390x / fgx.c
blob6c7905395b26110efca53e4c8005eb98cfb0862d
1 #include <stdio.h>
2 #include <string.h>
3 #include "opcodes.h"
5 int main()
7 register long g asm("r7");
8 register double f asm("f8");
9 double f1;
11 memset(&f1, 0x0f, sizeof(double));
12 f = f1;
13 g = 42;
14 printf("test LGDR\n\n");
15 printf("before g = %ld\n", g);
16 printf("before f = %a\n", f);
17 printf("copy f to g\n");
18 asm volatile ( LGDR(7,8) : "=d"(g) : "f"(f));
19 printf("after g = %16.16lx\n", g); /* 0x0x0x0...... */
20 printf("after f = %a\n", f);
22 printf("\ntest LDGR\n\n");
23 f = 3.14;
24 printf("before g = %16.16lx\n", g); /* 0x0x0x0...... */
25 printf("before f = %a\n", f);
26 printf("copy g to f\n");
27 asm volatile ( LDGR(8,7) : "=f"(f) : "d"(g));
28 printf("after g = %16.16lx\n", g); /* 0x0x0x0...... */
29 printf("after f = %a\n", f);
31 return 0;