URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
#include <limits.h>
|
#include <limits.h>
|
|
|
#if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull
|
#if ULONG_LONG_MAX != 18446744073709551615ull && ULONG_MAX != 18446744073709551615ull
|
int main(void) { exit (0); }
|
int main(void) { exit (0); }
|
#else
|
#else
|
#if ULONG_MAX != 18446744073709551615ull
|
#if ULONG_MAX != 18446744073709551615ull
|
typedef unsigned long long ull;
|
typedef unsigned long long ull;
|
#else
|
#else
|
typedef unsigned long ull;
|
typedef unsigned long ull;
|
#endif
|
#endif
|
|
|
#include <stdio.h>
|
#include <stdio.h>
|
|
|
void checkit(int);
|
void checkit(int);
|
|
|
main () {
|
main () {
|
const ull a = 0x1400000000ULL;
|
const ull a = 0x1400000000ULL;
|
const ull b = 0x80000000ULL;
|
const ull b = 0x80000000ULL;
|
const ull c = a/b;
|
const ull c = a/b;
|
const ull d = 0x1400000000ULL / 0x80000000ULL;
|
const ull d = 0x1400000000ULL / 0x80000000ULL;
|
|
|
checkit ((int) c);
|
checkit ((int) c);
|
checkit ((int) d);
|
checkit ((int) d);
|
|
|
exit(0);
|
exit(0);
|
}
|
}
|
|
|
void checkit (int a)
|
void checkit (int a)
|
{
|
{
|
if (a != 40)
|
if (a != 40)
|
abort();
|
abort();
|
}
|
}
|
#endif
|
#endif
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.