Merge remote-tracking branch 'remotes/dg-gitlab/tags/cgs-pull-request' into staging
[qemu/ar7.git] / tests / tcg / s390x / mvo.c
blob5546fe2a976708f77d80a21efa7964eb9e6550b2
1 #include <stdint.h>
2 #include <stdio.h>
4 int main(void)
6 uint8_t dest[6] = {0xff, 0x77, 0x88, 0x99, 0x0c, 0xff};
7 uint8_t src[5] = {0xee, 0x12, 0x34, 0x56, 0xee};
8 uint8_t expected[6] = {0xff, 0x01, 0x23, 0x45, 0x6c, 0xff};
9 int i;
11 asm volatile (
12 " mvo 0(4,%[dest]),0(3,%[src])\n"
14 : [dest] "d" (dest + 1),
15 [src] "d" (src + 1)
16 : "memory");
18 for (i = 0; i < sizeof(expected); i++) {
19 if (dest[i] != expected[i]) {
20 fprintf(stderr, "bad data\n");
21 return 1;
24 return 0;