Jia Liu | d70080c | 2012-10-24 22:17:13 +0800 | [diff] [blame] | 1 | #include "io.h" |
| 2 | |
| 3 | int main(void) |
| 4 | { |
| 5 | long long rt, rs; |
| 6 | long long res; |
| 7 | rt = 0x1234567887654321; |
| 8 | rs = 0xabcd1234abcd8765; |
| 9 | |
| 10 | res = 0x1234567887654321; |
| 11 | __asm |
| 12 | ("dappend %0, %1, 0x0\n\t" |
| 13 | : "=r"(rt) |
| 14 | : "r"(rs) |
| 15 | ); |
| 16 | |
| 17 | if (rt != res) { |
| 18 | printf("dappend error\n"); |
| 19 | return -1; |
| 20 | } |
| 21 | |
| 22 | rt = 0x1234567887654321; |
| 23 | rs = 0xabcd1234abcd8765; |
| 24 | |
| 25 | res = 0x2345678876543215; |
| 26 | __asm |
| 27 | ("dappend %0, %1, 0x4\n\t" |
| 28 | : "=r"(rt) |
| 29 | : "r"(rs) |
| 30 | ); |
| 31 | |
| 32 | if (rt != res) { |
| 33 | printf("dappend error\n"); |
| 34 | return -1; |
| 35 | } |
| 36 | return 0; |
| 37 | } |