]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcilkrts/runtime/config/generic/os-unix-sysdep.c
[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd
[thirdparty/gcc.git] / libcilkrts / runtime / config / generic / os-unix-sysdep.c
CommitLineData
3038054c
BI
1/* os-unix-sysdep.c -*-C-*-
2 *
3 *************************************************************************
4 *
2e01cda6 5 * Copyright (C) 2009-2016, Intel Corporation
3038054c
BI
6 * All rights reserved.
7 *
3038054c
BI
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 * * Neither the name of Intel Corporation nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
3038054c
BI
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
29 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
32 * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
2e01cda6
IV
34 *
35 * *********************************************************************
36 *
37 * PLEASE NOTE: This file is a downstream copy of a file mainitained in
38 * a repository at cilkplus.org. Changes made to this file that are not
39 * submitted through the contribution process detailed at
40 * http://www.cilkplus.org/submit-cilk-contribution will be lost the next
41 * time that a new version is released. Changes only submitted to the
42 * GNU compiler collection or posted to the git repository at
43 * https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
44 * not tracked.
45 *
46 * We welcome your contributions to this open source project. Thank you
47 * for your assistance in helping us improve Cilk Plus.
3038054c
BI
48 *************************************************************************
49 *
50 * This file contains generic implementations of system-specific code for
51 * Unix-based systems
52 */
53
54#include "os.h"
55#include "sysdep.h"
56
57/*
58 * The cycle counter is used for debugging. This funciton is only called if
59 * CILK_PROFILE is defined when the runtime is built.
60 */
61COMMON_SYSDEP unsigned long long __cilkrts_getticks(void)
62{
63# warning "unimplemented cycle counter"
64 return 0;
65}
66
67/*
68 * A "short pause" - called from the Cilk runtime's spinloops.
69 */
70COMMON_SYSDEP void __cilkrts_short_pause(void)
71{
72# warning __cilkrts_short_pause empty
73}
74
75/*
76 * Interlocked exchange - used to implement the Cilk runtime's spinloops
77 */
78COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x)
79{
80 x = __sync_lock_test_and_set(ptr, x);
81 return x;
82}
83
84
85/*
86 * Restore the floating point state that is stored in a stack frame at each
87 * spawn. This should be called each time a frame is resumed.
88 *
89 * Only valid for IA32 and Intel64 processors.
90 */
91void restore_x86_fp_state (__cilkrts_stack_frame *sf)
92{
93}
94
95
96/*
97 * Save the floating point state to the __cilkrts_stack_frame at each spawn.
98 *
99 * Architecture-specific - Should only be needed on IA32 and Intel64
100 * processors.
101 */
102void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf)
103{
104}
105