1*073d9f2cSAleksandar Markovic #include<stdio.h> 2*073d9f2cSAleksandar Markovic #include<assert.h> 3*073d9f2cSAleksandar Markovic 4*073d9f2cSAleksandar Markovic 5*073d9f2cSAleksandar Markovic int main() 6*073d9f2cSAleksandar Markovic { 7*073d9f2cSAleksandar Markovic int rd, rs, rt; 8*073d9f2cSAleksandar Markovic int result; 9*073d9f2cSAleksandar Markovic 10*073d9f2cSAleksandar Markovic rt = 0x10017EFD; 11*073d9f2cSAleksandar Markovic rs = 0x11111111; 12*073d9f2cSAleksandar Markovic result = 0x2112900e; 13*073d9f2cSAleksandar Markovic 14*073d9f2cSAleksandar Markovic __asm 15*073d9f2cSAleksandar Markovic ("addq_s.w %0, %1, %2\n\t" 16*073d9f2cSAleksandar Markovic : "=r"(rd) 17*073d9f2cSAleksandar Markovic : "r"(rs), "r"(rt) 18*073d9f2cSAleksandar Markovic ); 19*073d9f2cSAleksandar Markovic assert(rd == result); 20*073d9f2cSAleksandar Markovic 21*073d9f2cSAleksandar Markovic rt = 0x80017EFD; 22*073d9f2cSAleksandar Markovic rs = 0x81111111; 23*073d9f2cSAleksandar Markovic result = 0x80000000; 24*073d9f2cSAleksandar Markovic 25*073d9f2cSAleksandar Markovic __asm 26*073d9f2cSAleksandar Markovic ("addq_s.w %0, %1, %2\n\t" 27*073d9f2cSAleksandar Markovic : "=r"(rd) 28*073d9f2cSAleksandar Markovic : "r"(rs), "r"(rt) 29*073d9f2cSAleksandar Markovic ); 30*073d9f2cSAleksandar Markovic assert(rd == result); 31*073d9f2cSAleksandar Markovic 32*073d9f2cSAleksandar Markovic rt = 0x7fffffff; 33*073d9f2cSAleksandar Markovic rs = 0x01111111; 34*073d9f2cSAleksandar Markovic result = 0x7fffffff; 35*073d9f2cSAleksandar Markovic 36*073d9f2cSAleksandar Markovic __asm 37*073d9f2cSAleksandar Markovic ("addq_s.w %0, %1, %2\n\t" 38*073d9f2cSAleksandar Markovic : "=r"(rd) 39*073d9f2cSAleksandar Markovic : "r"(rs), "r"(rt) 40*073d9f2cSAleksandar Markovic ); 41*073d9f2cSAleksandar Markovic assert(rd == result); 42*073d9f2cSAleksandar Markovic 43*073d9f2cSAleksandar Markovic return 0; 44*073d9f2cSAleksandar Markovic } 45