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