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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [w65/] [cmpsi.c] - Blame information for rev 301

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.