1#include"io.h" 2 3int main(void) 4{ 5 long long rd, rs, rt; 6 long long dsp; 7 long long result; 8 9 rs = 0x11777066; 10 rt = 0x55AA70FF; 11 result = 0x0F; 12 __asm 13 ("cmpgdu.le.qb %0, %2, %3\n\t" 14 "rddsp %1\n\t" 15 : "=r"(rd), "=r"(dsp) 16 : "r"(rs), "r"(rt) 17 ); 18 dsp = (dsp >> 24) & 0x0F; 19 if (rd != result) { 20 printf("cmpgdu.le.qb error\n"); 21 return -1; 22 } 23 if (dsp != result) { 24 printf("cmpgdu.le.qb error\n"); 25 return -1; 26 } 27 28 rs = 0x11777066; 29 rt = 0x11707066; 30 result = 0x0B; 31 __asm 32 ("cmpgdu.le.qb %0, %2, %3\n\t" 33 "rddsp %1\n\t" 34 : "=r"(rd), "=r"(dsp) 35 : "r"(rs), "r"(rt) 36 ); 37 dsp = (dsp >> 24) & 0x0F; 38 if (rd != result) { 39 printf("cmpgdu.le.qb error\n"); 40 return -1; 41 } 42 if (dsp != result) { 43 printf("cmpgdu.le.qb error\n"); 44 return -1; 45 } 46 47 return 0; 48} 49