1 #include <stdint.h>
2 #include <stdio.h>
3 #include <string.h>
4 
5 void
test(int64_t op1_init,int64_t op2_init,int64_t op3_init)6 test(int64_t op1_init, int64_t op2_init, int64_t op3_init)
7 {
8    register int64_t op1 asm("8") = op1_init;
9    register int64_t op3 asm("9") = op3_init;
10 
11    int64_t op2 = op2_init;
12    int cc = 1;
13 
14    __asm__ volatile (
15            "csg     8,9,%1\n\t"
16            "ipm     %0\n\t"
17            "srl     %0,28\n\t"
18            : "=d" (cc), "+Q" (op2), "+d"(op1), "+d"(op3)
19            :
20            : "cc");
21 }
22 
main()23 int main ()
24 {
25    int64_t op1, op2, op3;
26 
27    test(op1, 0x1000000000000000ull, 0x1234567887654321ull);  // complaint
28    test(0x1000000000000000ull, op2, 0x1234567887654321ull);  // complaint
29    test(0x1000000000000000ull, 0x1000000000000000ull, op3);  // no complaint
30 
31    return 0;
32 }
33