OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.reverse/] [i387-stack-reverse.c] - Blame information for rev 231

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
#include <stdio.h>
2
#include <math.h>
3
#include <stdlib.h>
4
 
5
/* marks FPU stack as empty */
6
void empty_fpu_stack()
7
{
8
  asm ("ffree %st(1) \n\t"
9
       "ffree %st(2) \n\t"
10
       "ffree %st(3) \n\t"
11
       "ffree %st(4) \n\t"
12
       "ffree %st(5) \n\t"
13
       "ffree %st(6) \n\t"
14
       "ffree %st(7)");
15
}
16
 
17
/* tests floating point arithmatic */
18
void test_arith_floats()
19
{
20
 
21
}
22
 
23
int main()
24
{
25
  empty_fpu_stack();    /* BEGIN I387-FLOAT-REVERSE */
26
 
27
  asm ("fld1");   /* test st0 register */
28
  asm ("fldl2t"); /* test st0, st1 */
29
  asm ("fldl2e"); /* test st0, st1, st2 */
30
  asm ("fldpi");  /* test st0, st1, st2, st3 */
31
  asm ("fldlg2"); /* test st0, st1, st2, st3, st4 */
32
  asm ("fldln2"); /* test st0, st1, st2, st3, st4, st5 */
33
  asm ("fldz");   /* test st0, st1, st2, st3, st4, st5, st6 */
34
  asm ("fld1");   /* test st0, st1, st2, st3, st4, st5, st6, st7 */
35
  asm ("nop");
36
 
37
  return 1;             /* END I387-FLOAT-REVERSE */
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.