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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [align-main-1.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 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
 
8
#include <stddef.h>
9
 
10
#define ALIGNMENT 128
11
typedef int aligned __attribute__((aligned(ALIGNMENT)));
12
extern void abort(void);
13
 
14
__attribute__ ((noinline))
15
void check(void * a)
16
{
17
  if (((ptrdiff_t)a & (ALIGNMENT-1)) != 0)
18
    abort();
19
}
20
 
21
int main()
22
{
23
  aligned a = 1;
24
  check(&a);
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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