blob: 5ab7a2244dc209a7719c844ffd2fad6d278c8043 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic -g" } */
/* { dg-additional-options "-m31" { target s390x-*-* } } */
typedef __SIZE_TYPE__ uintptr_t;
static __thread uintptr_t start_sp;
static inline uintptr_t
__thread_stack_pointer (void)
{
return (uintptr_t) __builtin_frame_address (0);
}
void
update_data (void)
{
if (__builtin_expect ((!start_sp), 0))
start_sp = __thread_stack_pointer ();
uintptr_t sp = __thread_stack_pointer ();
if (__builtin_expect ((sp > start_sp), 0))
start_sp = sp;
}
|