1#include<stdio.h> 2#include<assert.h> 3 4int main() 5{ 6 int rs, rt; 7 int dsp; 8 int result; 9 10 rs = 0x11777066; 11 rt = 0x55AA70FF; 12 result = 0x0F; 13 __asm 14 ("cmpu.le.qb %1, %2\n\t" 15 "rddsp %0\n\t" 16 : "=r"(dsp) 17 : "r"(rs), "r"(rt) 18 ); 19 dsp = (dsp >> 24) & 0x0F; 20 assert(dsp == result); 21 22 rs = 0x11777066; 23 rt = 0x11777066; 24 result = 0x0F; 25 __asm 26 ("cmpu.le.qb %1, %2\n\t" 27 "rddsp %0\n\t" 28 : "=r"(dsp) 29 : "r"(rs), "r"(rt) 30 ); 31 dsp = (dsp >> 24) & 0x0F; 32 assert(dsp == result); 33 34 return 0; 35} 36