1#include "io.h" 2 3int main(void) 4{ 5 long long rd, rs, rt, result, dspreg, dspresult; 6 7 rs = 0x123456789ABCDEF0; 8 rt = 0x123456789ABCDEFF; 9 result = 0xFE; 10 dspresult = 0xFE; 11 12 __asm("cmpgdu.eq.ob %0, %2, %3\n\t" 13 "rddsp %1" 14 : "=r"(rd), "=r"(dspreg) 15 : "r"(rs), "r"(rt) 16 ); 17 18 dspreg = ((dspreg >> 24) & 0xFF); 19 20 if ((rd != result) || (dspreg != dspresult)) { 21 printf("1 cmpgdu.eq.ob error\n"); 22 return -1; 23 } 24 25 rs = 0x133256789ABCDEF0; 26 rt = 0x123456789ABCDEFF; 27 result = 0x3E; 28 dspresult = 0x3E; 29 30 __asm("cmpgdu.eq.ob %0, %2, %3\n\t" 31 "rddsp %1" 32 : "=r"(rd), "=r"(dspreg) 33 : "r"(rs), "r"(rt) 34 ); 35 36 dspreg = ((dspreg >> 24) & 0xFF); 37 38 if ((rd != result) || (dspreg != dspresult)) { 39 printf("2 cmpgdu.eq.ob error\n"); 40 return -1; 41 } 42 43 return 0; 44} 45