URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
313 |
jeremybenn |
/* Verify that if IP is saved to ensure stack alignment, we don't load
|
2 |
|
|
it into sp. */
|
3 |
|
|
/* { dg-do compile } */
|
4 |
|
|
/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */
|
5 |
|
|
/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */
|
6 |
|
|
/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */
|
7 |
|
|
/* { dg-options "-O -mno-apcs-frame -mcpu=iwmmxt -mabi=iwmmxt" } */
|
8 |
|
|
/* { dg-require-effective-target arm32 } */
|
9 |
|
|
/* { dg-require-effective-target arm_iwmmxt_ok } */
|
10 |
|
|
/* { dg-final { scan-assembler "ldmfd\[ ]sp!.*ip,\[ ]*pc" } } */
|
11 |
|
|
|
12 |
|
|
/* This function uses all the call-saved registers, namely r4, r5, r6,
|
13 |
|
|
r7, r8, r9, sl, fp. Since we also save lr, that leaves an odd
|
14 |
|
|
number of registers, and the compiler will push ip to align the
|
15 |
|
|
stack. Make sure that we restore ip into ip, not into sp as is
|
16 |
|
|
done when using a frame pointer. The -mno-apcs-frame option
|
17 |
|
|
permits the frame pointer to be used as an ordinary register. */
|
18 |
|
|
|
19 |
|
|
void
|
20 |
|
|
foo(void)
|
21 |
|
|
{
|
22 |
|
|
__asm volatile ("" : : :
|
23 |
|
|
"r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "lr");
|
24 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.