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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [shiftdi.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* Failed on sparc with -mv8plus because sparc.c:set_extends() thought
/* Failed on sparc with -mv8plus because sparc.c:set_extends() thought
   erroneously that SImode ASHIFT chops the upper bits, it does not.  */
   erroneously that SImode ASHIFT chops the upper bits, it does not.  */
 
 
typedef unsigned long long uint64;
typedef unsigned long long uint64;
 
 
void g(uint64 x, int y, int z, uint64 *p)
void g(uint64 x, int y, int z, uint64 *p)
{
{
        unsigned w = ((x >> y) & 0xffffffffULL) << (z & 0x1f);
        unsigned w = ((x >> y) & 0xffffffffULL) << (z & 0x1f);
        *p |= (w & 0xffffffffULL) << z;
        *p |= (w & 0xffffffffULL) << z;
}
}
 
 
int main(void)
int main(void)
{
{
        uint64 a = 0;
        uint64 a = 0;
        g(0xdeadbeef01234567ULL, 0, 0, &a);
        g(0xdeadbeef01234567ULL, 0, 0, &a);
        return (a == 0x01234567) ? 0 : 1;
        return (a == 0x01234567) ? 0 : 1;
}
}
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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