URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
void add_unwind_adjustsp (long);
|
void add_unwind_adjustsp (long);
|
void abort (void);
|
void abort (void);
|
|
|
unsigned char bytes[5];
|
unsigned char bytes[5];
|
|
|
void
|
void
|
add_unwind_adjustsp (long offset)
|
add_unwind_adjustsp (long offset)
|
{
|
{
|
int n;
|
int n;
|
unsigned long o;
|
unsigned long o;
|
|
|
o = (long) ((offset - 0x204) >> 2);
|
o = (long) ((offset - 0x204) >> 2);
|
|
|
n = 0;
|
n = 0;
|
while (o)
|
while (o)
|
{
|
{
|
bytes[n] = o & 0x7f;
|
bytes[n] = o & 0x7f;
|
o >>= 7;
|
o >>= 7;
|
if (o)
|
if (o)
|
bytes[n] |= 0x80;
|
bytes[n] |= 0x80;
|
n++;
|
n++;
|
}
|
}
|
}
|
}
|
|
|
int main(void)
|
int main(void)
|
{
|
{
|
add_unwind_adjustsp (4132);
|
add_unwind_adjustsp (4132);
|
if (bytes[0] != 0x88 || bytes[1] != 0x07)
|
if (bytes[0] != 0x88 || bytes[1] != 0x07)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.