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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libc/] [machine/] [w65/] [cmpsi.c] - Blame information for rev 802

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

Line No. Rev Author Line
1 207 jeremybenn
 
2
union u {
3
  struct {
4
  short int msw;
5
  unsigned short lsw;
6
} w;
7
long l;
8
};
9
 
10
int
11
__cmpsi2(long arga,
12
         short int msw_b, unsigned short int lsw_b)
13
{
14
  union u u;
15
  u.l = arga;
16
 
17
  if (u.w.msw != msw_b)
18
    {
19
      if (u.w.msw < msw_b) return 0;
20
      return 2;
21
    }
22
  if (u.w.lsw != lsw_b)
23
    {
24
      if (u.w.lsw < lsw_b) return 0;
25
      return 2;
26
    }
27
  return 1;
28
}

powered by: WebSVN 2.1.0

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