URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* Reduced testcase extracted from Samba source code. */
|
/* Reduced testcase extracted from Samba source code. */
|
|
|
#include <stdlib.h>
|
#include <stdlib.h>
|
|
|
static void __attribute__((__noinline__))
|
static void __attribute__((__noinline__))
|
foo (unsigned char *p) {
|
foo (unsigned char *p) {
|
*p = 0x81;
|
*p = 0x81;
|
}
|
}
|
|
|
static void __attribute__((__noinline__))
|
static void __attribute__((__noinline__))
|
bar (int x) {
|
bar (int x) {
|
asm ("");
|
asm ("");
|
}
|
}
|
|
|
int main() {
|
int main() {
|
unsigned char b;
|
unsigned char b;
|
|
|
foo(&b);
|
foo(&b);
|
if (b & 0x80)
|
if (b & 0x80)
|
{
|
{
|
bar (b & 0x7f);
|
bar (b & 0x7f);
|
exit (0);
|
exit (0);
|
}
|
}
|
else
|
else
|
{
|
{
|
bar (b & 1);
|
bar (b & 1);
|
abort ();
|
abort ();
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.