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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test for stack alignment when PREFERRED_STACK_BOUNDARY < alignment
2
   of local variable.  */
3
/* { dg-do compile } */
4
/* { dg-options "-O2 -mpreferred-stack-boundary=6 -mincoming-stack-boundary=6" } */
5
/* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-128,\[\\t \]*%\[re\]?sp" } } */
6
/* { dg-final { scan-assembler-not "and\[lq\]?\[\\t \]*\\$-64,\[\\t \]*%\[re\]?sp" } } */
7
/* { dg-skip-if "Options about stack-boundary aren't support" { x86_64-*-mingw* } { "*" } { "" } } */
8
 
9
#include <stddef.h>
10
 
11
#define ALIGNMENT 128
12
 
13
typedef int aligned __attribute__((aligned(ALIGNMENT)));
14
extern void abort(void);
15
 
16
__attribute__ ((noinline))
17
void check(void * a)
18
{
19
  if (((ptrdiff_t)a & (ALIGNMENT-1)) != 0)
20
    abort();
21
}
22
 
23
int main()
24
{
25
  aligned a = 1;
26
  check(&a);
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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