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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [shiftdi.c] - Blame information for rev 297

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

Line No. Rev Author Line
1 297 jeremybenn
/* Failed on sparc with -mv8plus because sparc.c:set_extends() thought
2
   erroneously that SImode ASHIFT chops the upper bits, it does not.  */
3
 
4
typedef unsigned long long uint64;
5
 
6
void g(uint64 x, int y, int z, uint64 *p)
7
{
8
        unsigned w = ((x >> y) & 0xffffffffULL) << (z & 0x1f);
9
        *p |= (w & 0xffffffffULL) << z;
10
}
11
 
12
int main(void)
13
{
14
        uint64 a = 0;
15
        g(0xdeadbeef01234567ULL, 0, 0, &a);
16
        return (a == 0x01234567) ? 0 : 1;
17
}
18
 
19
 
20
 

powered by: WebSVN 2.1.0

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