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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [mmx-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 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-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
8
/* { dg-options "-O -mno-apcs-frame -mcpu=iwmmxt -mabi=iwmmxt" } */
9
/* { dg-require-effective-target arm32 } */
10
/* { dg-require-effective-target arm_iwmmxt_ok } */
11
/* { dg-final { scan-assembler "ldmfd\[         ]sp!.*ip,\[ ]*pc" } } */
12
 
13
/* This function uses all the call-saved registers, namely r4, r5, r6,
14
   r7, r8, r9, sl, fp.  Since we also save lr, that leaves an odd
15
   number of registers, and the compiler will push ip to align the
16
   stack.  Make sure that we restore ip into ip, not into sp as is
17
   done when using a frame pointer.  The -mno-apcs-frame option
18
   permits the frame pointer to be used as an ordinary register.  */
19
 
20
void
21
foo(void)
22
{
23
  __asm volatile ("" : : :
24
                  "r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "lr");
25
}

powered by: WebSVN 2.1.0

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