1#include "io.h" 2 3int main(void) 4{ 5 long long rd, rs, rt, dspreg, result, dspresult; 6 rs = 0x123456789ABCDEF0; 7 rt = 0x123456789ABCDEF1; 8 result = 0x000000000000000F; 9 dspresult = 0x01; 10 11 __asm("subu.qh %0, %2, %3\n\t" 12 "rddsp %1\n\t" 13 : "=r"(rd), "=r"(dspreg) 14 : "r"(rs), "r"(rt) 15 ); 16 17 dspreg = ((dspreg >> 20) & 0x01); 18 if ((rd != result) || (dspreg != dspresult)) { 19 printf("subu.qh error\n"); 20 return -1; 21 } 22 23 return 0; 24} 25