1#include "io.h" 2 3int main(void) 4{ 5 long long rd, rs, rt, result; 6 rs = 0xFF987CDEBCEF2356; 7 rt = 0xFF987CDEBCEF2355; 8 result = 0xFF987CDEBCEF2356; 9 10 __asm("adduh_r.ob %0, %1, %2\n\t" 11 : "=r"(rd) 12 : "r"(rs), "r"(rt) 13 ); 14 15 if (rd != result) { 16 printf("1 adduh_r.ob error\n\t"); 17 return -1; 18 } 19 20 rs = 0xac50691729945316; 21 rt = 0xb9234ca3f5573162; 22 result = 0xb33a5b5d8f76423c; 23 24 __asm("adduh_r.ob %0, %1, %2\n\t" 25 : "=r"(rd) 26 : "r"(rs), "r"(rt) 27 ); 28 29 if (rd != result) { 30 printf("2 adduh_r.ob error\n\t"); 31 return -1; 32 } 33 34 return 0; 35} 36