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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [graphite/] [pr42221.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-options "-Os -fgraphite-identity" } */
2
 
3
static void b2w(unsigned int *out, const unsigned char *in, unsigned int len)
4
{
5
  const unsigned char *bpend = in + len;
6
  for (; in != bpend; in += 4, ++out)
7
  {
8
    *out = (unsigned int) (in[0] ) |
9
          (unsigned int) (in[3] << 24);
10
  }
11
}
12
static void md4step(unsigned int state[4], const unsigned char *data)
13
{
14
  unsigned int A, X[16];
15
  b2w(X, data, 64);
16
  state[0] += A;
17
}
18
void md4sum(void)
19
{
20
  unsigned char final[128];
21
  unsigned int state[4];
22
  md4step(state, final);
23
  md4step(state, final + 64);
24
}

powered by: WebSVN 2.1.0

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