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