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