1*d901eff3SJia Liu #include <stdio.h> 2*d901eff3SJia Liu 3*d901eff3SJia Liu int main(void) 4*d901eff3SJia Liu { 5*d901eff3SJia Liu float a, b, c; 6*d901eff3SJia Liu float result; 7*d901eff3SJia Liu 8*d901eff3SJia Liu b = 10.5; 9*d901eff3SJia Liu c = 1.5; 10*d901eff3SJia Liu result = 9.0; 11*d901eff3SJia Liu __asm 12*d901eff3SJia Liu ("lf.sub.s %0, %1, %2\n\t" 13*d901eff3SJia Liu : "=r"(a) 14*d901eff3SJia Liu : "r"(b), "r"(c) 15*d901eff3SJia Liu ); 16*d901eff3SJia Liu if (a != result) { 17*d901eff3SJia Liu printf("lf.sub.s error\n"); 18*d901eff3SJia Liu return -1; 19*d901eff3SJia Liu } 20*d901eff3SJia Liu 21*d901eff3SJia Liu /* b = 0x999; 22*d901eff3SJia Liu c = 0x654; 23*d901eff3SJia Liu result = 0x345; 24*d901eff3SJia Liu __asm 25*d901eff3SJia Liu ("lf.sub.d %0, %1, %2\n\t" 26*d901eff3SJia Liu : "=r"(a) 27*d901eff3SJia Liu : "r"(b), "r"(c) 28*d901eff3SJia Liu ); 29*d901eff3SJia Liu if (a != result) { 30*d901eff3SJia Liu printf("lf.sub.d error\n"); 31*d901eff3SJia Liu return -1; 32*d901eff3SJia Liu }*/ 33*d901eff3SJia Liu 34*d901eff3SJia Liu return 0; 35*d901eff3SJia Liu } 36