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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [tlscall.c] - Blame information for rev 858

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* Test non-duplication of tlscall insn */
2
 
3
/* { dg-do assemble } */
4
/* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */
5
 
6
typedef struct _IO_FILE FILE;
7
 
8
extern int foo(void);
9
extern int bar(void);
10
 
11
void uuid__generate_time()
12
{
13
 static int has_init = 0;
14
 static __thread int state_fd = -2;
15
 static __thread FILE *state_f;
16
 
17
 if (!has_init) {
18
   foo();
19
   has_init = 1;
20
 }
21
 
22
 if (state_fd == -2) {
23
  if (!state_f) {
24
   state_fd = -1;
25
  }
26
 }
27
 if (state_fd >= 0) {
28
  while (bar() < 0) {}
29
 }
30
 
31
}

powered by: WebSVN 2.1.0

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