Home | History | Annotate | Download | only in mips64
      1 #include <stdio.h>
      2 
      3 int main ()
      4 {
      5 #if defined(__mips_hard_float)
      6    long out [] = {0, 0};
      7    __asm__ volatile("cfc1       $a1,   $31"                 "\n\t"
      8                     "dli        $t0,   0x405ee0a3d70a3d71"  "\n\t"
      9                     "dmtc1      $t0,   $f0"                 "\n\t"
     10                     "ctc1       $zero, $31"                 "\n\t"
     11                     "round.w.d  $f0,   $f0"                 "\n\t"
     12                     "cfc1       $a2,   $31"                 "\n\t"
     13                     "sd         $a2,   0(%0)"               "\n\t"
     14                     "dli        $t0,   0x3ff0000000000000"  "\n\t"
     15                     "dmtc1      $t0,   $f0"                 "\n\t"
     16                     "ctc1       $zero, $31"                 "\n\t"
     17                     "round.w.d  $f0,   $f0"                 "\n\t"
     18                     "cfc1       $a2,   $31"                 "\n\t"
     19                     "sd         $a2,   8(%0)"               "\n\t"
     20                     "ctc1       $a1,   $31"                 "\n\t"
     21                     :
     22                     : "r" (out)
     23                     : "a1", "a2", "t0", "$f0"
     24                    );
     25    printf("FCSR::1: 0x%lx, 2: 0x%lx\n", out[0], out[1]);
     26 #endif
     27    return 0;
     28 }
     29