Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 571228 | Differences between
and this patch

Collapse All | Expand All

(-)a/runtime/cmake/LibompMicroTests.cmake (+1 lines)
Lines 198-203 else() Link Here
198
    elseif(${INTEL64})
198
    elseif(${INTEL64})
199
      libomp_append(libomp_expected_library_deps libc.so.6)
199
      libomp_append(libomp_expected_library_deps libc.so.6)
200
      libomp_append(libomp_expected_library_deps ld-linux-x86-64.so.2)
200
      libomp_append(libomp_expected_library_deps ld-linux-x86-64.so.2)
201
      libomp_append(libomp_expected_library_deps ld-linux-x32.so.2)
201
    elseif(${ARM})
202
    elseif(${ARM})
202
      libomp_append(libomp_expected_library_deps libc.so.6)
203
      libomp_append(libomp_expected_library_deps libc.so.6)
203
      libomp_append(libomp_expected_library_deps libffi.so.6)
204
      libomp_append(libomp_expected_library_deps libffi.so.6)
(-)a/runtime/src/kmp.h (-19 / +19 lines)
Lines 93-99 class kmp_stats_list; Link Here
93
#endif
93
#endif
94
#endif
94
#endif
95
95
96
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
96
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
97
#include <xmmintrin.h>
97
#include <xmmintrin.h>
98
#endif
98
#endif
99
99
Lines 468-474 enum mic_type { non_mic, mic1, mic2, mic3, dummy }; Link Here
468
#define KMP_FAST_REDUCTION_BARRIER 1
468
#define KMP_FAST_REDUCTION_BARRIER 1
469
469
470
#undef KMP_FAST_REDUCTION_CORE_DUO
470
#undef KMP_FAST_REDUCTION_CORE_DUO
471
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
471
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
472
#define KMP_FAST_REDUCTION_CORE_DUO 1
472
#define KMP_FAST_REDUCTION_CORE_DUO 1
473
#endif
473
#endif
474
474
Lines 721-727 enum affinity_top_method { Link Here
721
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
721
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
722
  affinity_top_method_apicid,
722
  affinity_top_method_apicid,
723
  affinity_top_method_x2apicid,
723
  affinity_top_method_x2apicid,
724
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
724
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
725
  affinity_top_method_cpuinfo, // KMP_CPUINFO_FILE is usable on Windows* OS, too
725
  affinity_top_method_cpuinfo, // KMP_CPUINFO_FILE is usable on Windows* OS, too
726
#if KMP_GROUP_AFFINITY
726
#if KMP_GROUP_AFFINITY
727
  affinity_top_method_group,
727
  affinity_top_method_group,
Lines 875-881 extern int __kmp_hws_abs_flag; // absolute or per-item number requested Link Here
875
875
876
#define KMP_MAX_STKSIZE (~((size_t)1 << ((sizeof(size_t) * (1 << 3)) - 1)))
876
#define KMP_MAX_STKSIZE (~((size_t)1 << ((sizeof(size_t) * (1 << 3)) - 1)))
877
877
878
#if KMP_ARCH_X86
878
#if KMP_ARCH_X86 || KMP_ARCH_X86_X32
879
#define KMP_DEFAULT_STKSIZE ((size_t)(2 * 1024 * 1024))
879
#define KMP_DEFAULT_STKSIZE ((size_t)(2 * 1024 * 1024))
880
#elif KMP_ARCH_X86_64
880
#elif KMP_ARCH_X86_64
881
#define KMP_DEFAULT_STKSIZE ((size_t)(4 * 1024 * 1024))
881
#define KMP_DEFAULT_STKSIZE ((size_t)(4 * 1024 * 1024))
Lines 931-937 extern int __kmp_hws_abs_flag; // absolute or per-item number requested Link Here
931
#else
931
#else
932
#define KMP_BLOCKTIME(team, tid)                                               \
932
#define KMP_BLOCKTIME(team, tid)                                               \
933
  (get__bt_set(team, tid) ? get__blocktime(team, tid) : __kmp_dflt_blocktime)
933
  (get__bt_set(team, tid) ? get__blocktime(team, tid) : __kmp_dflt_blocktime)
934
#if KMP_OS_UNIX && (KMP_ARCH_X86 || KMP_ARCH_X86_64)
934
#if KMP_OS_UNIX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
935
// HW TSC is used to reduce overhead (clock tick instead of nanosecond).
935
// HW TSC is used to reduce overhead (clock tick instead of nanosecond).
936
extern kmp_uint64 __kmp_ticks_per_msec;
936
extern kmp_uint64 __kmp_ticks_per_msec;
937
#if KMP_COMPILER_ICC
937
#if KMP_COMPILER_ICC
Lines 994-1000 extern kmp_uint64 __kmp_now_nsec(); Link Here
994
/* Minimum number of threads before switch to TLS gtid (experimentally
994
/* Minimum number of threads before switch to TLS gtid (experimentally
995
   determined) */
995
   determined) */
996
/* josh TODO: what about OS X* tuning? */
996
/* josh TODO: what about OS X* tuning? */
997
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
997
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
998
#define KMP_TLS_GTID_MIN 5
998
#define KMP_TLS_GTID_MIN 5
999
#else
999
#else
1000
#define KMP_TLS_GTID_MIN INT_MAX
1000
#define KMP_TLS_GTID_MIN INT_MAX
Lines 1042-1048 extern kmp_uint64 __kmp_now_nsec(); Link Here
1042
#define KMP_NEXT_WAIT 512U /* susequent number of spin-tests */
1042
#define KMP_NEXT_WAIT 512U /* susequent number of spin-tests */
1043
#endif
1043
#endif
1044
1044
1045
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1045
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1046
typedef struct kmp_cpuid {
1046
typedef struct kmp_cpuid {
1047
  kmp_uint32 eax;
1047
  kmp_uint32 eax;
1048
  kmp_uint32 ebx;
1048
  kmp_uint32 ebx;
Lines 1187-1193 typedef struct kmp_sys_info { Link Here
1187
  long nivcsw; /* the number of times a context switch was forced           */
1187
  long nivcsw; /* the number of times a context switch was forced           */
1188
} kmp_sys_info_t;
1188
} kmp_sys_info_t;
1189
1189
1190
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1190
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1191
typedef struct kmp_cpuinfo {
1191
typedef struct kmp_cpuinfo {
1192
  int initialized; // If 0, other fields are not initialized.
1192
  int initialized; // If 0, other fields are not initialized.
1193
  int signature; // CPUID(1).EAX
1193
  int signature; // CPUID(1).EAX
Lines 2529-2535 typedef int (*launch_t)(int gtid); Link Here
2529
// t_inline_argv. Historically, we have supported at least 96 bytes. Using a
2529
// t_inline_argv. Historically, we have supported at least 96 bytes. Using a
2530
// larger value for more space between the master write/worker read section and
2530
// larger value for more space between the master write/worker read section and
2531
// read/write by all section seems to buy more performance on EPCC PARALLEL.
2531
// read/write by all section seems to buy more performance on EPCC PARALLEL.
2532
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2532
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2533
#define KMP_INLINE_ARGV_BYTES                                                  \
2533
#define KMP_INLINE_ARGV_BYTES                                                  \
2534
  (4 * CACHE_LINE -                                                            \
2534
  (4 * CACHE_LINE -                                                            \
2535
   ((3 * KMP_PTR_SKIP + 2 * sizeof(int) + 2 * sizeof(kmp_int8) +               \
2535
   ((3 * KMP_PTR_SKIP + 2 * sizeof(int) + 2 * sizeof(kmp_int8) +               \
Lines 2580-2591 typedef struct KMP_ALIGN_CACHE kmp_base_team { Link Here
2580
  ompt_lw_taskteam_t *ompt_serialized_team_info;
2580
  ompt_lw_taskteam_t *ompt_serialized_team_info;
2581
#endif
2581
#endif
2582
2582
2583
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2583
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2584
  kmp_int8 t_fp_control_saved;
2584
  kmp_int8 t_fp_control_saved;
2585
  kmp_int8 t_pad2b;
2585
  kmp_int8 t_pad2b;
2586
  kmp_int16 t_x87_fpu_control_word; // FP control regs
2586
  kmp_int16 t_x87_fpu_control_word; // FP control regs
2587
  kmp_uint32 t_mxcsr;
2587
  kmp_uint32 t_mxcsr;
2588
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
2588
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
2589
2589
2590
  void *t_inline_argv[KMP_INLINE_ARGV_ENTRIES];
2590
  void *t_inline_argv[KMP_INLINE_ARGV_ENTRIES];
2591
2591
Lines 2609-2615 typedef struct KMP_ALIGN_CACHE kmp_base_team { Link Here
2609
// omp_set_num_threads() call
2609
// omp_set_num_threads() call
2610
2610
2611
// Read/write by workers as well
2611
// Read/write by workers as well
2612
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64)
2612
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
2613
  // Using CACHE_LINE=64 reduces memory footprint, but causes a big perf
2613
  // Using CACHE_LINE=64 reduces memory footprint, but causes a big perf
2614
  // regression of epcc 'parallel' and 'barrier' on fxe256lin01. This extra
2614
  // regression of epcc 'parallel' and 'barrier' on fxe256lin01. This extra
2615
  // padding serves to fix the performance of epcc 'parallel' and 'barrier' when
2615
  // padding serves to fix the performance of epcc 'parallel' and 'barrier' when
Lines 2751-2757 extern int __kmp_storage_map_verbose; /* True means storage map includes Link Here
2751
                                         placement info */
2751
                                         placement info */
2752
extern int __kmp_storage_map_verbose_specified;
2752
extern int __kmp_storage_map_verbose_specified;
2753
2753
2754
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2754
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2755
extern kmp_cpuinfo_t __kmp_cpuinfo;
2755
extern kmp_cpuinfo_t __kmp_cpuinfo;
2756
#endif
2756
#endif
2757
2757
Lines 2905-2915 extern KMP_THREAD_LOCAL int __kmp_gtid; Link Here
2905
#endif
2905
#endif
2906
extern int __kmp_tls_gtid_min; /* #threads below which use sp search for gtid */
2906
extern int __kmp_tls_gtid_min; /* #threads below which use sp search for gtid */
2907
extern int __kmp_foreign_tp; // If true, separate TP var for each foreign thread
2907
extern int __kmp_foreign_tp; // If true, separate TP var for each foreign thread
2908
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2908
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2909
extern int __kmp_inherit_fp_control; // copy fp creg(s) parent->workers at fork
2909
extern int __kmp_inherit_fp_control; // copy fp creg(s) parent->workers at fork
2910
extern kmp_int16 __kmp_init_x87_fpu_control_word; // init thread's FP ctrl reg
2910
extern kmp_int16 __kmp_init_x87_fpu_control_word; // init thread's FP ctrl reg
2911
extern kmp_uint32 __kmp_init_mxcsr; /* init thread's mxscr */
2911
extern kmp_uint32 __kmp_init_mxcsr; /* init thread's mxscr */
2912
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
2912
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
2913
2913
2914
extern int __kmp_dflt_max_active_levels; /* max_active_levels for nested
2914
extern int __kmp_dflt_max_active_levels; /* max_active_levels for nested
2915
                                            parallelism enabled by default via
2915
                                            parallelism enabled by default via
Lines 3222-3228 extern void __kmp_check_stack_overlap(kmp_info_t *thr); Link Here
3222
extern void __kmp_expand_host_name(char *buffer, size_t size);
3222
extern void __kmp_expand_host_name(char *buffer, size_t size);
3223
extern void __kmp_expand_file_name(char *result, size_t rlen, char *pattern);
3223
extern void __kmp_expand_file_name(char *result, size_t rlen, char *pattern);
3224
3224
3225
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
3225
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
3226
extern void
3226
extern void
3227
__kmp_initialize_system_tick(void); /* Initialize timer tick value */
3227
__kmp_initialize_system_tick(void); /* Initialize timer tick value */
3228
#endif
3228
#endif
Lines 3371-3377 extern int __kmp_fork_call(ident_t *loc, int gtid, Link Here
3371
                           enum fork_context_e fork_context, kmp_int32 argc,
3371
                           enum fork_context_e fork_context, kmp_int32 argc,
3372
                           microtask_t microtask, launch_t invoker,
3372
                           microtask_t microtask, launch_t invoker,
3373
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
3373
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
3374
#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
3374
#if (KMP_ARCH_ARM || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_AARCH64) && KMP_OS_LINUX
3375
                           va_list *ap
3375
                           va_list *ap
3376
#else
3376
#else
3377
                           va_list ap
3377
                           va_list ap
Lines 3483-3489 extern int __kmp_read_from_file(char const *path, char const *format, ...); Link Here
3483
// Assembly routines that have no compiler intrinsic replacement
3483
// Assembly routines that have no compiler intrinsic replacement
3484
//
3484
//
3485
3485
3486
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
3486
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
3487
3487
3488
extern void __kmp_query_cpuid(kmp_cpuinfo_t *p);
3488
extern void __kmp_query_cpuid(kmp_cpuinfo_t *p);
3489
3489
Lines 3495-3501 extern void __kmp_store_x87_fpu_control_word(kmp_int16 *p); Link Here
3495
extern void __kmp_clear_x87_fpu_status_word();
3495
extern void __kmp_clear_x87_fpu_status_word();
3496
#define KMP_X86_MXCSR_MASK 0xffffffc0 /* ignore status flags (6 lsb) */
3496
#define KMP_X86_MXCSR_MASK 0xffffffc0 /* ignore status flags (6 lsb) */
3497
3497
3498
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
3498
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
3499
3499
3500
extern int __kmp_invoke_microtask(microtask_t pkfn, int gtid, int npr, int argc,
3500
extern int __kmp_invoke_microtask(microtask_t pkfn, int gtid, int npr, int argc,
3501
                                  void *argv[]
3501
                                  void *argv[]
(-)a/runtime/src/kmp_affinity.cpp (-7 / +7 lines)
Lines 934-940 static int __kmp_affinity_create_proc_group_map(AddrUnsPair **address2os, Link Here
934
934
935
#endif /* KMP_GROUP_AFFINITY */
935
#endif /* KMP_GROUP_AFFINITY */
936
936
937
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
937
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
938
938
939
static int __kmp_cpuid_mask_width(int count) {
939
static int __kmp_cpuid_mask_width(int count) {
940
  int r = 0;
940
  int r = 0;
Lines 1858-1864 static int __kmp_affinity_create_x2apicid_map(AddrUnsPair **address2os, Link Here
1858
  return depth;
1858
  return depth;
1859
}
1859
}
1860
1860
1861
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1861
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1862
1862
1863
#define osIdIndex 0
1863
#define osIdIndex 0
1864
#define threadIdIndex 1
1864
#define threadIdIndex 1
Lines 2038-2044 static int __kmp_affinity_create_cpuinfo_map(AddrUnsPair **address2os, Link Here
2038
          goto dup_field;
2038
          goto dup_field;
2039
#endif
2039
#endif
2040
        threadInfo[num_avail][osIdIndex] = val;
2040
        threadInfo[num_avail][osIdIndex] = val;
2041
#if KMP_OS_LINUX && !(KMP_ARCH_X86 || KMP_ARCH_X86_64)
2041
#if KMP_OS_LINUX && !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
2042
        char path[256];
2042
        char path[256];
2043
        KMP_SNPRINTF(
2043
        KMP_SNPRINTF(
2044
            path, sizeof(path),
2044
            path, sizeof(path),
Lines 4068-4074 static void __kmp_aux_affinity_initialize(void) { Link Here
4068
    }
4068
    }
4069
#endif
4069
#endif
4070
4070
4071
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
4071
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
4072
4072
4073
    if (depth < 0) {
4073
    if (depth < 0) {
4074
      if (__kmp_affinity_verbose) {
4074
      if (__kmp_affinity_verbose) {
Lines 4101-4107 static void __kmp_aux_affinity_initialize(void) { Link Here
4101
      }
4101
      }
4102
    }
4102
    }
4103
4103
4104
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
4104
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
4105
4105
4106
#if KMP_OS_LINUX
4106
#if KMP_OS_LINUX
4107
4107
Lines 4184-4190 static void __kmp_aux_affinity_initialize(void) { Link Here
4184
// used, then we abort if that method fails. The exception is group affinity,
4184
// used, then we abort if that method fails. The exception is group affinity,
4185
// which might have been implicitly set.
4185
// which might have been implicitly set.
4186
4186
4187
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
4187
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
4188
4188
4189
  else if (__kmp_affinity_top_method == affinity_top_method_x2apicid) {
4189
  else if (__kmp_affinity_top_method == affinity_top_method_x2apicid) {
4190
    if (__kmp_affinity_verbose) {
4190
    if (__kmp_affinity_verbose) {
Lines 4214-4220 static void __kmp_aux_affinity_initialize(void) { Link Here
4214
    }
4214
    }
4215
  }
4215
  }
4216
4216
4217
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
4217
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
4218
4218
4219
  else if (__kmp_affinity_top_method == affinity_top_method_cpuinfo) {
4219
  else if (__kmp_affinity_top_method == affinity_top_method_cpuinfo) {
4220
    const char *filename;
4220
    const char *filename;
(-)a/runtime/src/kmp_affinity.h (+12 lines)
Lines 201-206 public: Link Here
201
#elif __NR_sched_getaffinity != 204
201
#elif __NR_sched_getaffinity != 204
202
#error Wrong code for getaffinity system call.
202
#error Wrong code for getaffinity system call.
203
#endif /* __NR_sched_getaffinity */
203
#endif /* __NR_sched_getaffinity */
204
#elif KMP_ARCH_X86_X32
205
#define __X32_SYSCALL_BIT 0x40000000
206
#ifndef __NR_sched_setaffinity
207
#define __NR_sched_setaffinity  (__X32_SYSCALL_BIT + 203)
208
#elif __NR_sched_setaffinity != (__X32_SYSCALL_BIT + 203)
209
#error Wrong code for setaffinity system call.
210
#endif /* __NR_sched_setaffinity */
211
#ifndef __NR_sched_getaffinity
212
#define __NR_sched_getaffinity  (__X32_SYSCALL_BIT + 204)
213
#elif __NR_sched_getaffinity != (__X32_SYSCALL_BIT + 204)
214
#error Wrong code for getaffinity system call.
215
#endif /* __NR_sched_getaffinity */
204
#elif KMP_ARCH_PPC64
216
#elif KMP_ARCH_PPC64
205
#ifndef __NR_sched_setaffinity
217
#ifndef __NR_sched_setaffinity
206
#define __NR_sched_setaffinity 222
218
#define __NR_sched_setaffinity 222
(-)a/runtime/src/kmp_atomic.cpp (-23 / +23 lines)
Lines 816-822 static inline void operator/=(kmp_cmplx128_a16_t &lhs, Link Here
816
// end of the first part of the workaround for C78287
816
// end of the first part of the workaround for C78287
817
#endif // USE_CMPXCHG_FIX
817
#endif // USE_CMPXCHG_FIX
818
818
819
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
819
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
820
820
821
// ------------------------------------------------------------------------
821
// ------------------------------------------------------------------------
822
// X86 or X86_64: no alignment problems ====================================
822
// X86 or X86_64: no alignment problems ====================================
Lines 889-895 static inline void operator/=(kmp_cmplx128_a16_t &lhs, Link Here
889
  }
889
  }
890
// end of the second part of the workaround for C78287
890
// end of the second part of the workaround for C78287
891
#endif // USE_CMPXCHG_FIX
891
#endif // USE_CMPXCHG_FIX
892
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
892
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
893
893
894
// Routines for ATOMIC 4-byte operands addition and subtraction
894
// Routines for ATOMIC 4-byte operands addition and subtraction
895
ATOMIC_FIXED_ADD(fixed4, add, kmp_int32, 32, +, 4i, 3,
895
ATOMIC_FIXED_ADD(fixed4, add, kmp_int32, 32, +, 4i, 3,
Lines 1030-1036 ATOMIC_CMPXCHG(float8, mul, kmp_real64, 64, *, 8r, 7, Link Here
1030
  OP_CRITICAL(= *lhs OP, LCK_ID)                                               \
1030
  OP_CRITICAL(= *lhs OP, LCK_ID)                                               \
1031
  }
1031
  }
1032
1032
1033
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1033
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1034
1034
1035
// ------------------------------------------------------------------------
1035
// ------------------------------------------------------------------------
1036
// X86 or X86_64: no alignment problems ===================================
1036
// X86 or X86_64: no alignment problems ===================================
Lines 1053-1059 ATOMIC_CMPXCHG(float8, mul, kmp_real64, 64, *, 8r, 7, Link Here
1053
    OP_CRITICAL(= *lhs OP, LCK_ID) /* unaligned - use critical */              \
1053
    OP_CRITICAL(= *lhs OP, LCK_ID) /* unaligned - use critical */              \
1054
  }                                                                            \
1054
  }                                                                            \
1055
  }
1055
  }
1056
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1056
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1057
1057
1058
ATOMIC_CMPX_L(fixed1, andl, char, 8, &&, 1i, 0,
1058
ATOMIC_CMPX_L(fixed1, andl, char, 8, &&, 1i, 0,
1059
              KMP_ARCH_X86) // __kmpc_atomic_fixed1_andl
1059
              KMP_ARCH_X86) // __kmpc_atomic_fixed1_andl
Lines 1129-1135 ATOMIC_CMPX_L(fixed8, orl, kmp_int64, 64, ||, 8i, 7, Link Here
1129
  }                                                                            \
1129
  }                                                                            \
1130
  }
1130
  }
1131
1131
1132
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1132
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1133
1133
1134
// -------------------------------------------------------------------------
1134
// -------------------------------------------------------------------------
1135
// X86 or X86_64: no alignment problems ====================================
1135
// X86 or X86_64: no alignment problems ====================================
Lines 1158-1164 ATOMIC_CMPX_L(fixed8, orl, kmp_int64, 64, ||, 8i, 7, Link Here
1158
    }                                                                          \
1158
    }                                                                          \
1159
  }                                                                            \
1159
  }                                                                            \
1160
  }
1160
  }
1161
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1161
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1162
1162
1163
MIN_MAX_COMPXCHG(fixed1, max, char, 8, <, 1i, 0,
1163
MIN_MAX_COMPXCHG(fixed1, max, char, 8, <, 1i, 0,
1164
                 KMP_ARCH_X86) // __kmpc_atomic_fixed1_max
1164
                 KMP_ARCH_X86) // __kmpc_atomic_fixed1_max
Lines 1206-1212 MIN_MAX_CRITICAL(float16, min_a16, Quad_a16_t, >, 16r, Link Here
1206
  }
1206
  }
1207
1207
1208
// ------------------------------------------------------------------------
1208
// ------------------------------------------------------------------------
1209
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1209
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1210
// ------------------------------------------------------------------------
1210
// ------------------------------------------------------------------------
1211
// X86 or X86_64: no alignment problems ===================================
1211
// X86 or X86_64: no alignment problems ===================================
1212
#define ATOMIC_CMPX_EQV(TYPE_ID, OP_ID, TYPE, BITS, OP, LCK_ID, MASK,          \
1212
#define ATOMIC_CMPX_EQV(TYPE_ID, OP_ID, TYPE, BITS, OP, LCK_ID, MASK,          \
Lines 1230-1236 MIN_MAX_CRITICAL(float16, min_a16, Quad_a16_t, >, 16r, Link Here
1230
    OP_CRITICAL(^= ~, LCK_ID) /* unaligned address - use critical */           \
1230
    OP_CRITICAL(^= ~, LCK_ID) /* unaligned address - use critical */           \
1231
  }                                                                            \
1231
  }                                                                            \
1232
  }
1232
  }
1233
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1233
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1234
1234
1235
ATOMIC_CMPXCHG(fixed1, neqv, kmp_int8, 8, ^, 1i, 0,
1235
ATOMIC_CMPXCHG(fixed1, neqv, kmp_int8, 8, ^, 1i, 0,
1236
               KMP_ARCH_X86) // __kmpc_atomic_fixed1_neqv
1236
               KMP_ARCH_X86) // __kmpc_atomic_fixed1_neqv
Lines 1349-1355 ATOMIC_CRITICAL(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, Link Here
1349
1349
1350
// OpenMP 4.0: x = expr binop x for non-commutative operations.
1350
// OpenMP 4.0: x = expr binop x for non-commutative operations.
1351
// Supported only on IA-32 architecture and Intel(R) 64
1351
// Supported only on IA-32 architecture and Intel(R) 64
1352
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1352
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1353
1353
1354
// ------------------------------------------------------------------------
1354
// ------------------------------------------------------------------------
1355
// Operation on *lhs, rhs bound by critical section
1355
// Operation on *lhs, rhs bound by critical section
Lines 1553-1559 ATOMIC_CRITICAL_REV(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, Link Here
1553
#endif
1553
#endif
1554
#endif
1554
#endif
1555
1555
1556
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
1556
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1557
// End of OpenMP 4.0: x = expr binop x for non-commutative operations.
1557
// End of OpenMP 4.0: x = expr binop x for non-commutative operations.
1558
1558
1559
#endif // OMP_40_ENABLED
1559
#endif // OMP_40_ENABLED
Lines 1586-1592 ATOMIC_CRITICAL_REV(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, Link Here
1586
  }
1586
  }
1587
1587
1588
// -------------------------------------------------------------------------
1588
// -------------------------------------------------------------------------
1589
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1589
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1590
// -------------------------------------------------------------------------
1590
// -------------------------------------------------------------------------
1591
// X86 or X86_64: no alignment problems ====================================
1591
// X86 or X86_64: no alignment problems ====================================
1592
#define ATOMIC_CMPXCHG_MIX(TYPE_ID, TYPE, OP_ID, BITS, OP, RTYPE_ID, RTYPE,    \
1592
#define ATOMIC_CMPXCHG_MIX(TYPE_ID, TYPE, OP_ID, BITS, OP, RTYPE_ID, RTYPE,    \
Lines 1610-1619 ATOMIC_CRITICAL_REV(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, Link Here
1610
    OP_CRITICAL(OP## =, LCK_ID) /* unaligned address - use critical */         \
1610
    OP_CRITICAL(OP## =, LCK_ID) /* unaligned address - use critical */         \
1611
  }                                                                            \
1611
  }                                                                            \
1612
  }
1612
  }
1613
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1613
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1614
1614
1615
// -------------------------------------------------------------------------
1615
// -------------------------------------------------------------------------
1616
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1616
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1617
// -------------------------------------------------------------------------
1617
// -------------------------------------------------------------------------
1618
#define ATOMIC_CMPXCHG_REV_MIX(TYPE_ID, TYPE, OP_ID, BITS, OP, RTYPE_ID,       \
1618
#define ATOMIC_CMPXCHG_REV_MIX(TYPE_ID, TYPE, OP_ID, BITS, OP, RTYPE_ID,       \
1619
                               RTYPE, LCK_ID, MASK, GOMP_FLAG)                 \
1619
                               RTYPE, LCK_ID, MASK, GOMP_FLAG)                 \
Lines 1627-1633 ATOMIC_CRITICAL_REV(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, Link Here
1627
  OP_GOMP_CRITICAL_REV(OP, GOMP_FLAG)                                          \
1627
  OP_GOMP_CRITICAL_REV(OP, GOMP_FLAG)                                          \
1628
  OP_CRITICAL_REV(OP, LCK_ID)                                                  \
1628
  OP_CRITICAL_REV(OP, LCK_ID)                                                  \
1629
  }
1629
  }
1630
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1630
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1631
1631
1632
// RHS=float8
1632
// RHS=float8
1633
ATOMIC_CMPXCHG_MIX(fixed1, char, mul, 8, *, float8, kmp_real64, 1i, 0,
1633
ATOMIC_CMPXCHG_MIX(fixed1, char, mul, 8, *, float8, kmp_real64, 1i, 0,
Lines 1753-1759 ATOMIC_CRITICAL_FP(float10, long double, mul, *, fp, _Quad, 10r, Link Here
1753
ATOMIC_CRITICAL_FP(float10, long double, div, /, fp, _Quad, 10r,
1753
ATOMIC_CRITICAL_FP(float10, long double, div, /, fp, _Quad, 10r,
1754
                   1) // __kmpc_atomic_float10_div_fp
1754
                   1) // __kmpc_atomic_float10_div_fp
1755
1755
1756
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1756
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1757
// Reverse operations
1757
// Reverse operations
1758
ATOMIC_CMPXCHG_REV_MIX(fixed1, char, sub_rev, 8, -, fp, _Quad, 1i, 0,
1758
ATOMIC_CMPXCHG_REV_MIX(fixed1, char, sub_rev, 8, -, fp, _Quad, 1i, 0,
1759
                       KMP_ARCH_X86) // __kmpc_atomic_fixed1_sub_rev_fp
1759
                       KMP_ARCH_X86) // __kmpc_atomic_fixed1_sub_rev_fp
Lines 1805-1815 ATOMIC_CRITICAL_REV_FP(float10, long double, sub_rev, -, fp, _Quad, 10r, Link Here
1805
                       1) // __kmpc_atomic_float10_sub_rev_fp
1805
                       1) // __kmpc_atomic_float10_sub_rev_fp
1806
ATOMIC_CRITICAL_REV_FP(float10, long double, div_rev, /, fp, _Quad, 10r,
1806
ATOMIC_CRITICAL_REV_FP(float10, long double, div_rev, /, fp, _Quad, 10r,
1807
                       1) // __kmpc_atomic_float10_div_rev_fp
1807
                       1) // __kmpc_atomic_float10_div_rev_fp
1808
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1808
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1809
1809
1810
#endif
1810
#endif
1811
1811
1812
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1812
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1813
// ------------------------------------------------------------------------
1813
// ------------------------------------------------------------------------
1814
// X86 or X86_64: no alignment problems ====================================
1814
// X86 or X86_64: no alignment problems ====================================
1815
#if USE_CMPXCHG_FIX
1815
#if USE_CMPXCHG_FIX
Lines 1843-1849 ATOMIC_CRITICAL_REV_FP(float10, long double, div_rev, /, fp, _Quad, 10r, Link Here
1843
    OP_CRITICAL(OP## =, LCK_ID) /* unaligned address - use critical */         \
1843
    OP_CRITICAL(OP## =, LCK_ID) /* unaligned address - use critical */         \
1844
  }                                                                            \
1844
  }                                                                            \
1845
  }
1845
  }
1846
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1846
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1847
1847
1848
ATOMIC_CMPXCHG_CMPLX(cmplx4, kmp_cmplx32, add, 64, +, cmplx8, kmp_cmplx64, 8c,
1848
ATOMIC_CMPXCHG_CMPLX(cmplx4, kmp_cmplx32, add, 64, +, cmplx8, kmp_cmplx64, 8c,
1849
                     7, KMP_ARCH_X86) // __kmpc_atomic_cmplx4_add_cmplx8
1849
                     7, KMP_ARCH_X86) // __kmpc_atomic_cmplx4_add_cmplx8
Lines 1855-1861 ATOMIC_CMPXCHG_CMPLX(cmplx4, kmp_cmplx32, div, 64, /, cmplx8, kmp_cmplx64, 8c, Link Here
1855
                     7, KMP_ARCH_X86) // __kmpc_atomic_cmplx4_div_cmplx8
1855
                     7, KMP_ARCH_X86) // __kmpc_atomic_cmplx4_div_cmplx8
1856
1856
1857
// READ, WRITE, CAPTURE are supported only on IA-32 architecture and Intel(R) 64
1857
// READ, WRITE, CAPTURE are supported only on IA-32 architecture and Intel(R) 64
1858
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1858
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1859
1859
1860
// ------------------------------------------------------------------------
1860
// ------------------------------------------------------------------------
1861
// Atomic READ routines
1861
// Atomic READ routines
Lines 3326-3332 ATOMIC_CRITICAL_SWP(cmplx16_a16, kmp_cmplx128_a16_t, 32c, Link Here
3326
3326
3327
#endif // OMP_40_ENABLED
3327
#endif // OMP_40_ENABLED
3328
3328
3329
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
3329
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
3330
3330
3331
#undef OP_CRITICAL
3331
#undef OP_CRITICAL
3332
3332
Lines 3385-3391 void __kmpc_atomic_2(ident_t *id_ref, int gtid, void *lhs, void *rhs, Link Here
3385
  if (
3385
  if (
3386
#if KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
3386
#if KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
3387
      FALSE /* must use lock */
3387
      FALSE /* must use lock */
3388
#elif KMP_ARCH_X86 || KMP_ARCH_X86_64
3388
#elif KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
3389
      TRUE /* no alignment problems */
3389
      TRUE /* no alignment problems */
3390
#else
3390
#else
3391
      !((kmp_uintptr_t)lhs & 0x1) /* make sure address is 2-byte aligned */
3391
      !((kmp_uintptr_t)lhs & 0x1) /* make sure address is 2-byte aligned */
Lines 3434-3440 void __kmpc_atomic_4(ident_t *id_ref, int gtid, void *lhs, void *rhs, Link Here
3434
  if (
3434
  if (
3435
// FIXME: On IA-32 architecture, gcc uses cmpxchg only for 4-byte ints.
3435
// FIXME: On IA-32 architecture, gcc uses cmpxchg only for 4-byte ints.
3436
// Gomp compatibility is broken if this routine is called for floats.
3436
// Gomp compatibility is broken if this routine is called for floats.
3437
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
3437
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
3438
      TRUE /* no alignment problems */
3438
      TRUE /* no alignment problems */
3439
#else
3439
#else
3440
      !((kmp_uintptr_t)lhs & 0x3) /* make sure address is 4-byte aligned */
3440
      !((kmp_uintptr_t)lhs & 0x3) /* make sure address is 4-byte aligned */
Lines 3484-3490 void __kmpc_atomic_8(ident_t *id_ref, int gtid, void *lhs, void *rhs, Link Here
3484
3484
3485
#if KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
3485
#if KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT)
3486
      FALSE /* must use lock */
3486
      FALSE /* must use lock */
3487
#elif KMP_ARCH_X86 || KMP_ARCH_X86_64
3487
#elif KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
3488
      TRUE /* no alignment problems */
3488
      TRUE /* no alignment problems */
3489
#else
3489
#else
3490
      !((kmp_uintptr_t)lhs & 0x7) /* make sure address is 8-byte aligned */
3490
      !((kmp_uintptr_t)lhs & 0x7) /* make sure address is 8-byte aligned */
(-)a/runtime/src/kmp_atomic.h (-4 / +4 lines)
Lines 692-698 void __kmpc_atomic_cmplx16_div_a16(ident_t *id_ref, int gtid, Link Here
692
692
693
// OpenMP 4.0: x = expr binop x for non-commutative operations.
693
// OpenMP 4.0: x = expr binop x for non-commutative operations.
694
// Supported only on IA-32 architecture and Intel(R) 64
694
// Supported only on IA-32 architecture and Intel(R) 64
695
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
695
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
696
696
697
void __kmpc_atomic_fixed1_sub_rev(ident_t *id_ref, int gtid, char *lhs,
697
void __kmpc_atomic_fixed1_sub_rev(ident_t *id_ref, int gtid, char *lhs,
698
                                  char rhs);
698
                                  char rhs);
Lines 792-798 void __kmpc_atomic_cmplx16_div_a16_rev(ident_t *id_ref, int gtid, Link Here
792
#endif
792
#endif
793
#endif // KMP_HAVE_QUAD
793
#endif // KMP_HAVE_QUAD
794
794
795
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
795
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
796
796
797
#endif // OMP_40_ENABLED
797
#endif // OMP_40_ENABLED
798
798
Lines 999-1005 void __kmpc_atomic_32(ident_t *id_ref, int gtid, void *lhs, void *rhs, Link Here
999
                      void (*f)(void *, void *, void *));
999
                      void (*f)(void *, void *, void *));
1000
1000
1001
// READ, WRITE, CAPTURE are supported only on IA-32 architecture and Intel(R) 64
1001
// READ, WRITE, CAPTURE are supported only on IA-32 architecture and Intel(R) 64
1002
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1002
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1003
1003
1004
//  Below routines for atomic READ are listed
1004
//  Below routines for atomic READ are listed
1005
char __kmpc_atomic_fixed1_rd(ident_t *id_ref, int gtid, char *loc);
1005
char __kmpc_atomic_fixed1_rd(ident_t *id_ref, int gtid, char *loc);
Lines 1763-1769 long double __kmpc_atomic_float10_div_cpt_rev_fp(ident_t *id_ref, int gtid, Link Here
1763
1763
1764
#endif // OMP_40_ENABLED
1764
#endif // OMP_40_ENABLED
1765
1765
1766
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
1766
#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1767
1767
1768
/* ------------------------------------------------------------------------ */
1768
/* ------------------------------------------------------------------------ */
1769
1769
(-)a/runtime/src/kmp_csupport.cpp (-8 / +8 lines)
Lines 300-306 void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) { Link Here
300
                    VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
300
                    VOLATILE_CAST(microtask_t) microtask, // "wrapped" task
301
                    VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
301
                    VOLATILE_CAST(launch_t) __kmp_invoke_task_func,
302
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
302
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
303
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
303
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
304
                    &ap
304
                    &ap
305
#else
305
#else
306
                    ap
306
                    ap
Lines 388-394 void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, Link Here
388
                  VOLATILE_CAST(microtask_t)
388
                  VOLATILE_CAST(microtask_t)
389
                      __kmp_teams_master, // "wrapped" task
389
                      __kmp_teams_master, // "wrapped" task
390
                  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
390
                  VOLATILE_CAST(launch_t) __kmp_invoke_teams_master,
391
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
391
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
392
                  &ap
392
                  &ap
393
#else
393
#else
394
                  ap
394
                  ap
Lines 530-542 void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { Link Here
530
530
531
/* return to the parallel section */
531
/* return to the parallel section */
532
532
533
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
533
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
534
    if (__kmp_inherit_fp_control && serial_team->t.t_fp_control_saved) {
534
    if (__kmp_inherit_fp_control && serial_team->t.t_fp_control_saved) {
535
      __kmp_clear_x87_fpu_status_word();
535
      __kmp_clear_x87_fpu_status_word();
536
      __kmp_load_x87_fpu_control_word(&serial_team->t.t_x87_fpu_control_word);
536
      __kmp_load_x87_fpu_control_word(&serial_team->t.t_x87_fpu_control_word);
537
      __kmp_load_mxcsr(&serial_team->t.t_mxcsr);
537
      __kmp_load_mxcsr(&serial_team->t.t_mxcsr);
538
    }
538
    }
539
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
539
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
540
540
541
    this_thr->th.th_team = serial_team->t.t_parent;
541
    this_thr->th.th_team = serial_team->t.t_parent;
542
    this_thr->th.th_info.ds.ds_tid = serial_team->t.t_master_tid;
542
    this_thr->th.th_info.ds.ds_tid = serial_team->t.t_master_tid;
Lines 597-603 void __kmpc_flush(ident_t *loc) { Link Here
597
  /* need explicit __mf() here since use volatile instead in library */
597
  /* need explicit __mf() here since use volatile instead in library */
598
  KMP_MB(); /* Flush all pending memory write invalidates.  */
598
  KMP_MB(); /* Flush all pending memory write invalidates.  */
599
599
600
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64)
600
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
601
#if KMP_MIC
601
#if KMP_MIC
602
// fence-style instructions do not exist, but lock; xaddl $0,(%rsp) can be used.
602
// fence-style instructions do not exist, but lock; xaddl $0,(%rsp) can be used.
603
// We shouldn't need it, though, since the ABI rules require that
603
// We shouldn't need it, though, since the ABI rules require that
Lines 1210-1216 static __forceinline kmp_dyna_lockseq_t __kmp_map_hint_to_lock(uintptr_t hint) { Link Here
1210
#define KMP_TSX_LOCK(seq) __kmp_user_lock_seq
1210
#define KMP_TSX_LOCK(seq) __kmp_user_lock_seq
1211
#endif
1211
#endif
1212
1212
1213
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1213
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1214
#define KMP_CPUINFO_RTM (__kmp_cpuinfo.rtm)
1214
#define KMP_CPUINFO_RTM (__kmp_cpuinfo.rtm)
1215
#else
1215
#else
1216
#define KMP_CPUINFO_RTM 0
1216
#define KMP_CPUINFO_RTM 0
Lines 2678-2684 void __kmpc_unset_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) { Link Here
2678
  if ((__kmp_user_lock_kind == lk_tas) &&
2678
  if ((__kmp_user_lock_kind == lk_tas) &&
2679
      (sizeof(lck->tas.lk.poll) <= OMP_LOCK_T_SIZE)) {
2679
      (sizeof(lck->tas.lk.poll) <= OMP_LOCK_T_SIZE)) {
2680
#if KMP_OS_LINUX &&                                                            \
2680
#if KMP_OS_LINUX &&                                                            \
2681
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
2681
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
2682
// "fast" path implemented to fix customer performance issue
2682
// "fast" path implemented to fix customer performance issue
2683
#if USE_ITT_BUILD
2683
#if USE_ITT_BUILD
2684
    __kmp_itt_lock_releasing((kmp_user_lock_p)user_lock);
2684
    __kmp_itt_lock_releasing((kmp_user_lock_p)user_lock);
Lines 2772-2778 void __kmpc_unset_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock) { Link Here
2772
      (sizeof(lck->tas.lk.poll) + sizeof(lck->tas.lk.depth_locked) <=
2772
      (sizeof(lck->tas.lk.poll) + sizeof(lck->tas.lk.depth_locked) <=
2773
       OMP_NEST_LOCK_T_SIZE)) {
2773
       OMP_NEST_LOCK_T_SIZE)) {
2774
#if KMP_OS_LINUX &&                                                            \
2774
#if KMP_OS_LINUX &&                                                            \
2775
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
2775
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
2776
    // "fast" path implemented to fix customer performance issue
2776
    // "fast" path implemented to fix customer performance issue
2777
    kmp_tas_lock_t *tl = (kmp_tas_lock_t *)user_lock;
2777
    kmp_tas_lock_t *tl = (kmp_tas_lock_t *)user_lock;
2778
#if USE_ITT_BUILD
2778
#if USE_ITT_BUILD
(-)a/runtime/src/kmp_global.cpp (-3 / +3 lines)
Lines 16-22 Link Here
16
16
17
kmp_key_t __kmp_gtid_threadprivate_key;
17
kmp_key_t __kmp_gtid_threadprivate_key;
18
18
19
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
19
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
20
kmp_cpuinfo_t __kmp_cpuinfo = {0}; // Not initialized
20
kmp_cpuinfo_t __kmp_cpuinfo = {0}; // Not initialized
21
#endif
21
#endif
22
22
Lines 177-187 KMP_THREAD_LOCAL int __kmp_gtid = KMP_GTID_DNE; Link Here
177
#endif /* KMP_TDATA_GTID */
177
#endif /* KMP_TDATA_GTID */
178
int __kmp_tls_gtid_min = INT_MAX;
178
int __kmp_tls_gtid_min = INT_MAX;
179
int __kmp_foreign_tp = TRUE;
179
int __kmp_foreign_tp = TRUE;
180
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
180
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
181
int __kmp_inherit_fp_control = TRUE;
181
int __kmp_inherit_fp_control = TRUE;
182
kmp_int16 __kmp_init_x87_fpu_control_word = 0;
182
kmp_int16 __kmp_init_x87_fpu_control_word = 0;
183
kmp_uint32 __kmp_init_mxcsr = 0;
183
kmp_uint32 __kmp_init_mxcsr = 0;
184
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
184
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
185
185
186
#ifdef USE_LOAD_BALANCE
186
#ifdef USE_LOAD_BALANCE
187
double __kmp_load_balance_interval = 1.0;
187
double __kmp_load_balance_interval = 1.0;
(-)a/runtime/src/kmp_gsupport.cpp (-1 / +1 lines)
Lines 376-382 static Link Here
376
376
377
  rc = __kmp_fork_call(loc, gtid, fork_context_gnu, argc, wrapper,
377
  rc = __kmp_fork_call(loc, gtid, fork_context_gnu, argc, wrapper,
378
                       __kmp_invoke_task_func,
378
                       __kmp_invoke_task_func,
379
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
379
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
380
                       &ap
380
                       &ap
381
#else
381
#else
382
                       ap
382
                       ap
(-)a/runtime/src/kmp_itt.h (-3 / +3 lines)
Lines 155-165 __kmp_inline void __kmp_itt_stack_callee_leave(__itt_caller); Link Here
155
   therefore uninteresting when collecting traces for architecture simulation.
155
   therefore uninteresting when collecting traces for architecture simulation.
156
 */
156
 */
157
#ifndef INCLUDE_SSC_MARKS
157
#ifndef INCLUDE_SSC_MARKS
158
#define INCLUDE_SSC_MARKS (KMP_OS_LINUX && KMP_ARCH_X86_64)
158
#define INCLUDE_SSC_MARKS (KMP_OS_LINUX && (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32))
159
#endif
159
#endif
160
160
161
/* Linux 64 only for now */
161
/* Linux 64 and Linux 64/x32 only for now */
162
#if (INCLUDE_SSC_MARKS && KMP_OS_LINUX && KMP_ARCH_X86_64)
162
#if (INCLUDE_SSC_MARKS && KMP_OS_LINUX && (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32))
163
// Portable (at least for gcc and icc) code to insert the necessary instructions
163
// Portable (at least for gcc and icc) code to insert the necessary instructions
164
// to set %ebx and execute the unlikely no-op.
164
// to set %ebx and execute the unlikely no-op.
165
#if defined(__INTEL_COMPILER)
165
#if defined(__INTEL_COMPILER)
(-)a/runtime/src/kmp_lock.cpp (-1 / +1 lines)
Lines 2736-2742 static void __kmp_set_drdpa_lock_flags(kmp_drdpa_lock_t *lck, Link Here
2736
}
2736
}
2737
2737
2738
// Time stamp counter
2738
// Time stamp counter
2739
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2739
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2740
#define __kmp_tsc() __kmp_hardware_timestamp()
2740
#define __kmp_tsc() __kmp_hardware_timestamp()
2741
// Runtime's default backoff parameters
2741
// Runtime's default backoff parameters
2742
kmp_backoff_t __kmp_spin_backoff_params = {1, 4096, 100};
2742
kmp_backoff_t __kmp_spin_backoff_params = {1, 4096, 100};
(-)a/runtime/src/kmp_lock.h (-6 / +6 lines)
Lines 161-167 extern void __kmp_destroy_nested_tas_lock(kmp_tas_lock_t *lck); Link Here
161
161
162
#define KMP_USE_FUTEX                                                          \
162
#define KMP_USE_FUTEX                                                          \
163
  (KMP_OS_LINUX && !KMP_OS_CNK &&                                              \
163
  (KMP_OS_LINUX && !KMP_OS_CNK &&                                              \
164
   (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64))
164
   (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64))
165
165
166
#if KMP_USE_FUTEX
166
#if KMP_USE_FUTEX
167
167
Lines 630-636 extern int (*__kmp_acquire_user_lock_with_checks_)(kmp_user_lock_p lck, Link Here
630
                                                   kmp_int32 gtid);
630
                                                   kmp_int32 gtid);
631
631
632
#if KMP_OS_LINUX &&                                                            \
632
#if KMP_OS_LINUX &&                                                            \
633
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
633
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
634
634
635
#define __kmp_acquire_user_lock_with_checks(lck, gtid)                         \
635
#define __kmp_acquire_user_lock_with_checks(lck, gtid)                         \
636
  if (__kmp_user_lock_kind == lk_tas) {                                        \
636
  if (__kmp_user_lock_kind == lk_tas) {                                        \
Lines 684-690 extern int (*__kmp_test_user_lock_with_checks_)(kmp_user_lock_p lck, Link Here
684
                                                kmp_int32 gtid);
684
                                                kmp_int32 gtid);
685
685
686
#if KMP_OS_LINUX &&                                                            \
686
#if KMP_OS_LINUX &&                                                            \
687
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
687
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
688
688
689
#include "kmp_i18n.h" /* AC: KMP_FATAL definition */
689
#include "kmp_i18n.h" /* AC: KMP_FATAL definition */
690
extern int __kmp_env_consistency_check; /* AC: copy from kmp.h here */
690
extern int __kmp_env_consistency_check; /* AC: copy from kmp.h here */
Lines 748-754 static inline void __kmp_destroy_user_lock_with_checks(kmp_user_lock_p lck) { Link Here
748
extern int (*__kmp_acquire_nested_user_lock_with_checks_)(kmp_user_lock_p lck,
748
extern int (*__kmp_acquire_nested_user_lock_with_checks_)(kmp_user_lock_p lck,
749
                                                          kmp_int32 gtid);
749
                                                          kmp_int32 gtid);
750
750
751
#if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64)
751
#if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
752
752
753
#define __kmp_acquire_nested_user_lock_with_checks(lck, gtid, depth)           \
753
#define __kmp_acquire_nested_user_lock_with_checks(lck, gtid, depth)           \
754
  if (__kmp_user_lock_kind == lk_tas) {                                        \
754
  if (__kmp_user_lock_kind == lk_tas) {                                        \
Lines 806-812 __kmp_acquire_nested_user_lock_with_checks(kmp_user_lock_p lck, kmp_int32 gtid, Link Here
806
extern int (*__kmp_test_nested_user_lock_with_checks_)(kmp_user_lock_p lck,
806
extern int (*__kmp_test_nested_user_lock_with_checks_)(kmp_user_lock_p lck,
807
                                                       kmp_int32 gtid);
807
                                                       kmp_int32 gtid);
808
808
809
#if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64)
809
#if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
810
static inline int __kmp_test_nested_user_lock_with_checks(kmp_user_lock_p lck,
810
static inline int __kmp_test_nested_user_lock_with_checks(kmp_user_lock_p lck,
811
                                                          kmp_int32 gtid) {
811
                                                          kmp_int32 gtid) {
812
  if (__kmp_user_lock_kind == lk_tas) {
812
  if (__kmp_user_lock_kind == lk_tas) {
Lines 1052-1058 extern void __kmp_cleanup_user_locks(); Link Here
1052
1052
1053
// Shortcuts
1053
// Shortcuts
1054
#define KMP_USE_INLINED_TAS                                                    \
1054
#define KMP_USE_INLINED_TAS                                                    \
1055
  (KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM)) && 1
1055
  (KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM)) && 1
1056
#define KMP_USE_INLINED_FUTEX KMP_USE_FUTEX && 0
1056
#define KMP_USE_INLINED_FUTEX KMP_USE_FUTEX && 0
1057
1057
1058
// List of lock definitions; all nested locks are indirect locks.
1058
// List of lock definitions; all nested locks are indirect locks.
(-)a/runtime/src/kmp_os.h (-1 / +1 lines)
Lines 153-159 typedef unsigned long long kmp_uint64; Link Here
153
#error "Can't determine size_t printf format specifier."
153
#error "Can't determine size_t printf format specifier."
154
#endif
154
#endif
155
155
156
#if KMP_ARCH_X86
156
#if KMP_ARCH_X86 || ( KMP_ARCH_X86_64 && __ILP32__ )
157
#define KMP_SIZE_T_MAX (0xFFFFFFFF)
157
#define KMP_SIZE_T_MAX (0xFFFFFFFF)
158
#else
158
#else
159
#define KMP_SIZE_T_MAX (0xFFFFFFFFFFFFFFFF)
159
#define KMP_SIZE_T_MAX (0xFFFFFFFFFFFFFFFF)
(-)a/runtime/src/kmp_platform.h (-3 / +9 lines)
Lines 74-79 Link Here
74
74
75
#define KMP_ARCH_X86 0
75
#define KMP_ARCH_X86 0
76
#define KMP_ARCH_X86_64 0
76
#define KMP_ARCH_X86_64 0
77
#define KMP_ARCH_X86_X32 0
77
#define KMP_ARCH_AARCH64 0
78
#define KMP_ARCH_AARCH64 0
78
#define KMP_ARCH_PPC64_BE 0
79
#define KMP_ARCH_PPC64_BE 0
79
#define KMP_ARCH_PPC64_LE 0
80
#define KMP_ARCH_PPC64_LE 0
Lines 93-100 Link Here
93
94
94
#if KMP_OS_UNIX
95
#if KMP_OS_UNIX
95
#if defined __x86_64
96
#if defined __x86_64
97
#if defined __ILP32__
98
#undef KMP_ARCH_X86_X32
99
#define KMP_ARCH_X86_X32 1
100
#else
96
#undef KMP_ARCH_X86_64
101
#undef KMP_ARCH_X86_64
97
#define KMP_ARCH_X86_64 1
102
#define KMP_ARCH_X86_64 1
103
#endif
98
#elif defined __i386
104
#elif defined __i386
99
#undef KMP_ARCH_X86
105
#undef KMP_ARCH_X86
100
#define KMP_ARCH_X86 1
106
#define KMP_ARCH_X86 1
Lines 176-187 Link Here
176
182
177
// Platforms which support Intel(R) Many Integrated Core Architecture
183
// Platforms which support Intel(R) Many Integrated Core Architecture
178
#define KMP_MIC_SUPPORTED                                                      \
184
#define KMP_MIC_SUPPORTED                                                      \
179
  ((KMP_ARCH_X86 || KMP_ARCH_X86_64) && (KMP_OS_LINUX || KMP_OS_WINDOWS))
185
  ((KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32) && (KMP_OS_LINUX || KMP_OS_WINDOWS))
180
186
181
// TODO: Fixme - This is clever, but really fugly
187
// TODO: Fixme - This is clever, but really fugly
182
#if (1 !=                                                                      \
188
#if (1 !=                                                                      \
183
     KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_ARM + KMP_ARCH_PPC64 +          \
189
     KMP_ARCH_X86 + KMP_ARCH_X86_64 + KMP_ARCH_X86_X32 + KMP_ARCH_ARM +	   \
184
         KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64)
190
     	 KMP_ARCH_PPC64 + KMP_ARCH_AARCH64 + KMP_ARCH_MIPS + KMP_ARCH_MIPS64)
185
#error Unknown or unsupported architecture
191
#error Unknown or unsupported architecture
186
#endif
192
#endif
187
193
(-)a/runtime/src/kmp_runtime.cpp (-15 / +15 lines)
Lines 1081-1087 static void __kmp_fork_team_threads(kmp_root_t *root, kmp_team_t *team, Link Here
1081
  KMP_MB();
1081
  KMP_MB();
1082
}
1082
}
1083
1083
1084
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1084
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1085
// Propagate any changes to the floating point control registers out to the team
1085
// Propagate any changes to the floating point control registers out to the team
1086
// We try to avoid unnecessary writes to the relevant cache line in the team
1086
// We try to avoid unnecessary writes to the relevant cache line in the team
1087
// structure, so we don't make changes unless they are needed.
1087
// structure, so we don't make changes unless they are needed.
Lines 1141-1147 inline static void updateHWFPControl(kmp_team_t *team) { Link Here
1141
#else
1141
#else
1142
#define propagateFPControl(x) ((void)0)
1142
#define propagateFPControl(x) ((void)0)
1143
#define updateHWFPControl(x) ((void)0)
1143
#define updateHWFPControl(x) ((void)0)
1144
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1144
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1145
1145
1146
static void __kmp_alloc_argv_entries(int argc, kmp_team_t *team,
1146
static void __kmp_alloc_argv_entries(int argc, kmp_team_t *team,
1147
                                     int realloc); // forward declaration
1147
                                     int realloc); // forward declaration
Lines 1401-1407 int __kmp_fork_call(ident_t *loc, int gtid, Link Here
1401
                    enum fork_context_e call_context, // Intel, GNU, ...
1401
                    enum fork_context_e call_context, // Intel, GNU, ...
1402
                    kmp_int32 argc, microtask_t microtask, launch_t invoker,
1402
                    kmp_int32 argc, microtask_t microtask, launch_t invoker,
1403
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
1403
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
1404
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1404
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1405
                    va_list *ap
1405
                    va_list *ap
1406
#else
1406
#else
1407
                    va_list ap
1407
                    va_list ap
Lines 1518-1524 int __kmp_fork_call(ident_t *loc, int gtid, Link Here
1518
      argv = (void **)parent_team->t.t_argv;
1518
      argv = (void **)parent_team->t.t_argv;
1519
      for (i = argc - 1; i >= 0; --i)
1519
      for (i = argc - 1; i >= 0; --i)
1520
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
1520
/* TODO: revert workaround for Intel(R) 64 tracker #96 */
1521
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1521
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1522
        *argv++ = va_arg(*ap, void *);
1522
        *argv++ = va_arg(*ap, void *);
1523
#else
1523
#else
1524
        *argv++ = va_arg(ap, void *);
1524
        *argv++ = va_arg(ap, void *);
Lines 1721-1731 int __kmp_fork_call(ident_t *loc, int gtid, Link Here
1721
    if (nthreads == 1) {
1721
    if (nthreads == 1) {
1722
/* josh todo: hypothetical question: what do we do for OS X*? */
1722
/* josh todo: hypothetical question: what do we do for OS X*? */
1723
#if KMP_OS_LINUX &&                                                            \
1723
#if KMP_OS_LINUX &&                                                            \
1724
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
1724
    (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)
1725
      void *args[argc];
1725
      void *args[argc];
1726
#else
1726
#else
1727
      void **args = (void **)KMP_ALLOCA(argc * sizeof(void *));
1727
      void **args = (void **)KMP_ALLOCA(argc * sizeof(void *));
1728
#endif /* KMP_OS_LINUX && ( KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || \
1728
#endif /* KMP_OS_LINUX && ( KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || \
1729
          KMP_ARCH_AARCH64) */
1729
          KMP_ARCH_AARCH64) */
1730
1730
1731
      KA_TRACE(20,
1731
      KA_TRACE(20,
Lines 1813-1819 int __kmp_fork_call(ident_t *loc, int gtid, Link Here
1813
          if (ap) {
1813
          if (ap) {
1814
            for (i = argc - 1; i >= 0; --i)
1814
            for (i = argc - 1; i >= 0; --i)
1815
// TODO: revert workaround for Intel(R) 64 tracker #96
1815
// TODO: revert workaround for Intel(R) 64 tracker #96
1816
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1816
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1817
              *argv++ = va_arg(*ap, void *);
1817
              *argv++ = va_arg(*ap, void *);
1818
#else
1818
#else
1819
              *argv++ = va_arg(ap, void *);
1819
              *argv++ = va_arg(ap, void *);
Lines 1837-1843 int __kmp_fork_call(ident_t *loc, int gtid, Link Here
1837
          argv = args;
1837
          argv = args;
1838
          for (i = argc - 1; i >= 0; --i)
1838
          for (i = argc - 1; i >= 0; --i)
1839
// TODO: revert workaround for Intel(R) 64 tracker #96
1839
// TODO: revert workaround for Intel(R) 64 tracker #96
1840
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1840
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
1841
            *argv++ = va_arg(*ap, void *);
1841
            *argv++ = va_arg(*ap, void *);
1842
#else
1842
#else
1843
          *argv++ = va_arg(ap, void *);
1843
          *argv++ = va_arg(ap, void *);
Lines 2145-2151 int __kmp_fork_call(ident_t *loc, int gtid, Link Here
2145
#endif /* OMP_40_ENABLED */
2145
#endif /* OMP_40_ENABLED */
2146
      for (i = argc - 1; i >= 0; --i) {
2146
      for (i = argc - 1; i >= 0; --i) {
2147
// TODO: revert workaround for Intel(R) 64 tracker #96
2147
// TODO: revert workaround for Intel(R) 64 tracker #96
2148
#if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
2148
#if (KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX
2149
        void *new_argv = va_arg(*ap, void *);
2149
        void *new_argv = va_arg(*ap, void *);
2150
#else
2150
#else
2151
      void *new_argv = va_arg(ap, void *);
2151
      void *new_argv = va_arg(ap, void *);
Lines 4470-4480 static void __kmp_initialize_team(kmp_team_t *team, int new_nproc, Link Here
4470
  // TODO???: team->t.t_max_active_levels       = new_max_active_levels;
4470
  // TODO???: team->t.t_max_active_levels       = new_max_active_levels;
4471
  team->t.t_sched.sched = new_icvs->sched.sched;
4471
  team->t.t_sched.sched = new_icvs->sched.sched;
4472
4472
4473
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
4473
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
4474
  team->t.t_fp_control_saved = FALSE; /* not needed */
4474
  team->t.t_fp_control_saved = FALSE; /* not needed */
4475
  team->t.t_x87_fpu_control_word = 0; /* not needed */
4475
  team->t.t_x87_fpu_control_word = 0; /* not needed */
4476
  team->t.t_mxcsr = 0; /* not needed */
4476
  team->t.t_mxcsr = 0; /* not needed */
4477
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
4477
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
4478
4478
4479
  team->t.t_construct = 0;
4479
  team->t.t_construct = 0;
4480
4480
Lines 6264-6270 void __kmp_register_library_startup(void) { Link Here
6264
    double dtime;
6264
    double dtime;
6265
    long ltime;
6265
    long ltime;
6266
  } time;
6266
  } time;
6267
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
6267
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
6268
  __kmp_initialize_system_tick();
6268
  __kmp_initialize_system_tick();
6269
#endif
6269
#endif
6270
  __kmp_read_system_time(&time.dtime);
6270
  __kmp_read_system_time(&time.dtime);
Lines 6839-6851 void __kmp_parallel_initialize(void) { Link Here
6839
  KA_TRACE(10, ("__kmp_parallel_initialize: enter\n"));
6839
  KA_TRACE(10, ("__kmp_parallel_initialize: enter\n"));
6840
  KMP_ASSERT(KMP_UBER_GTID(gtid));
6840
  KMP_ASSERT(KMP_UBER_GTID(gtid));
6841
6841
6842
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
6842
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
6843
  // Save the FP control regs.
6843
  // Save the FP control regs.
6844
  // Worker threads will set theirs to these values at thread startup.
6844
  // Worker threads will set theirs to these values at thread startup.
6845
  __kmp_store_x87_fpu_control_word(&__kmp_init_x87_fpu_control_word);
6845
  __kmp_store_x87_fpu_control_word(&__kmp_init_x87_fpu_control_word);
6846
  __kmp_store_mxcsr(&__kmp_init_mxcsr);
6846
  __kmp_store_mxcsr(&__kmp_init_mxcsr);
6847
  __kmp_init_mxcsr &= KMP_X86_MXCSR_MASK;
6847
  __kmp_init_mxcsr &= KMP_X86_MXCSR_MASK;
6848
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
6848
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
6849
6849
6850
#if KMP_OS_UNIX
6850
#if KMP_OS_UNIX
6851
#if KMP_HANDLE_SIGNALS
6851
#if KMP_HANDLE_SIGNALS
Lines 7673-7679 __kmp_determine_reduction_method( Link Here
7673
#endif // KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_WINDOWS ||
7673
#endif // KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_WINDOWS ||
7674
// KMP_OS_DARWIN
7674
// KMP_OS_DARWIN
7675
7675
7676
#elif KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_MIPS
7676
#elif KMP_ARCH_X86 || KMP_ARCH_X86_X32 || KMP_ARCH_ARM || KMP_ARCH_AARCH || KMP_ARCH_MIPS
7677
7677
7678
#if KMP_OS_LINUX || KMP_OS_WINDOWS
7678
#if KMP_OS_LINUX || KMP_OS_WINDOWS
7679
7679
(-)a/runtime/src/kmp_settings.cpp (-8 / +8 lines)
Lines 686-692 static void __kmp_stg_print_duplicate_lib_ok(kmp_str_buf_t *buffer, Link Here
686
// -----------------------------------------------------------------------------
686
// -----------------------------------------------------------------------------
687
// KMP_INHERIT_FP_CONTROL
687
// KMP_INHERIT_FP_CONTROL
688
688
689
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
689
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
690
690
691
static void __kmp_stg_parse_inherit_fp_control(char const *name,
691
static void __kmp_stg_parse_inherit_fp_control(char const *name,
692
                                               char const *value, void *data) {
692
                                               char const *value, void *data) {
Lines 700-706 static void __kmp_stg_print_inherit_fp_control(kmp_str_buf_t *buffer, Link Here
700
#endif /* KMP_DEBUG */
700
#endif /* KMP_DEBUG */
701
} // __kmp_stg_print_inherit_fp_control
701
} // __kmp_stg_print_inherit_fp_control
702
702
703
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
703
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
704
704
705
// -----------------------------------------------------------------------------
705
// -----------------------------------------------------------------------------
706
// KMP_LIBRARY, OMP_WAIT_POLICY
706
// KMP_LIBRARY, OMP_WAIT_POLICY
Lines 2900-2906 static void __kmp_stg_parse_topology_method(char const *name, char const *value, Link Here
2900
    __kmp_affinity_top_method = affinity_top_method_hwloc;
2900
    __kmp_affinity_top_method = affinity_top_method_hwloc;
2901
  }
2901
  }
2902
#endif
2902
#endif
2903
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2903
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2904
  else if (__kmp_str_match("x2apic id", 9, value) ||
2904
  else if (__kmp_str_match("x2apic id", 9, value) ||
2905
           __kmp_str_match("x2apic_id", 9, value) ||
2905
           __kmp_str_match("x2apic_id", 9, value) ||
2906
           __kmp_str_match("x2apic-id", 9, value) ||
2906
           __kmp_str_match("x2apic-id", 9, value) ||
Lines 2948-2954 static void __kmp_stg_parse_topology_method(char const *name, char const *value, Link Here
2948
             __kmp_str_match("leaf4", 5, value)) {
2948
             __kmp_str_match("leaf4", 5, value)) {
2949
    __kmp_affinity_top_method = affinity_top_method_apicid;
2949
    __kmp_affinity_top_method = affinity_top_method_apicid;
2950
  }
2950
  }
2951
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
2951
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
2952
  else if (__kmp_str_match("/proc/cpuinfo", 2, value) ||
2952
  else if (__kmp_str_match("/proc/cpuinfo", 2, value) ||
2953
           __kmp_str_match("cpuinfo", 5, value)) {
2953
           __kmp_str_match("cpuinfo", 5, value)) {
2954
    __kmp_affinity_top_method = affinity_top_method_cpuinfo;
2954
    __kmp_affinity_top_method = affinity_top_method_cpuinfo;
Lines 2978-2984 static void __kmp_stg_print_topology_method(kmp_str_buf_t *buffer, Link Here
2978
    value = "all";
2978
    value = "all";
2979
    break;
2979
    break;
2980
2980
2981
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
2981
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
2982
  case affinity_top_method_x2apicid:
2982
  case affinity_top_method_x2apicid:
2983
    value = "x2APIC id";
2983
    value = "x2APIC id";
2984
    break;
2984
    break;
Lines 2986-2992 static void __kmp_stg_print_topology_method(kmp_str_buf_t *buffer, Link Here
2986
  case affinity_top_method_apicid:
2986
  case affinity_top_method_apicid:
2987
    value = "APIC id";
2987
    value = "APIC id";
2988
    break;
2988
    break;
2989
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
2989
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
2990
2990
2991
#if KMP_USE_HWLOC
2991
#if KMP_USE_HWLOC
2992
  case affinity_top_method_hwloc:
2992
  case affinity_top_method_hwloc:
Lines 4469-4478 static kmp_setting_t __kmp_stg_table[] = { Link Here
4469
     __kmp_stg_print_handle_signals, NULL, 0, 0},
4469
     __kmp_stg_print_handle_signals, NULL, 0, 0},
4470
#endif
4470
#endif
4471
4471
4472
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
4472
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
4473
    {"KMP_INHERIT_FP_CONTROL", __kmp_stg_parse_inherit_fp_control,
4473
    {"KMP_INHERIT_FP_CONTROL", __kmp_stg_parse_inherit_fp_control,
4474
     __kmp_stg_print_inherit_fp_control, NULL, 0, 0},
4474
     __kmp_stg_print_inherit_fp_control, NULL, 0, 0},
4475
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
4475
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
4476
4476
4477
#ifdef KMP_GOMP_COMPAT
4477
#ifdef KMP_GOMP_COMPAT
4478
    {"GOMP_STACKSIZE", __kmp_stg_parse_stacksize, NULL, NULL, 0, 0},
4478
    {"GOMP_STACKSIZE", __kmp_stg_parse_stacksize, NULL, NULL, 0, 0},
(-)a/runtime/src/kmp_stats.cpp (-1 / +1 lines)
Lines 561-567 void kmp_stats_output_module::printHeaderInfo(FILE *statsOut) { Link Here
561
  fprintf(statsOut, "# Time of run: %s\n", &buffer[0]);
561
  fprintf(statsOut, "# Time of run: %s\n", &buffer[0]);
562
  if (gethostname(&hostName[0], sizeof(hostName)) == 0)
562
  if (gethostname(&hostName[0], sizeof(hostName)) == 0)
563
    fprintf(statsOut, "# Hostname: %s\n", &hostName[0]);
563
    fprintf(statsOut, "# Hostname: %s\n", &hostName[0]);
564
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
564
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
565
  fprintf(statsOut, "# CPU:  %s\n", &__kmp_cpuinfo.name[0]);
565
  fprintf(statsOut, "# CPU:  %s\n", &__kmp_cpuinfo.name[0]);
566
  fprintf(statsOut, "# Family: %d, Model: %d, Stepping: %d\n",
566
  fprintf(statsOut, "# Family: %d, Model: %d, Stepping: %d\n",
567
          __kmp_cpuinfo.family, __kmp_cpuinfo.model, __kmp_cpuinfo.stepping);
567
          __kmp_cpuinfo.family, __kmp_cpuinfo.model, __kmp_cpuinfo.stepping);
(-)a/runtime/src/kmp_stats_timing.cpp (-1 / +1 lines)
Lines 29-35 double tsc_tick_count::tick_time() { Link Here
29
  // pretty bad assumption of 1GHz clock for MIC
29
  // pretty bad assumption of 1GHz clock for MIC
30
  return 1 / ((double)1000 * 1.e6);
30
  return 1 / ((double)1000 * 1.e6);
31
}
31
}
32
#elif KMP_ARCH_X86 || KMP_ARCH_X86_64
32
#elif KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
33
#include <string.h>
33
#include <string.h>
34
// Extract the value from the CPUID information
34
// Extract the value from the CPUID information
35
double tsc_tick_count::tick_time() {
35
double tsc_tick_count::tick_time() {
(-)a/runtime/src/kmp_taskq.cpp (-2 / +2 lines)
Lines 1918-1924 void __kmpc_end_taskq_task(ident_t *loc, kmp_int32 global_tid, Link Here
1918
    __kmp_pop_workshare(global_tid, ct_taskq, loc);
1918
    __kmp_pop_workshare(global_tid, ct_taskq, loc);
1919
1919
1920
  if (in_parallel) {
1920
  if (in_parallel) {
1921
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1921
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1922
    KMP_TEST_THEN_OR32(RCAST(volatile kmp_uint32 *, &queue->tq_flags),
1922
    KMP_TEST_THEN_OR32(RCAST(volatile kmp_uint32 *, &queue->tq_flags),
1923
                       TQF_ALL_TASKS_QUEUED);
1923
                       TQF_ALL_TASKS_QUEUED);
1924
#else
1924
#else
Lines 1949-1955 void __kmpc_end_taskq_task(ident_t *loc, kmp_int32 global_tid, Link Here
1949
      /* No synchronization needed for serial context */
1949
      /* No synchronization needed for serial context */
1950
      queue->tq_flags |= TQF_IS_LAST_TASK;
1950
      queue->tq_flags |= TQF_IS_LAST_TASK;
1951
    } else {
1951
    } else {
1952
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1952
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1953
      KMP_TEST_THEN_OR32(RCAST(volatile kmp_uint32 *, &queue->tq_flags),
1953
      KMP_TEST_THEN_OR32(RCAST(volatile kmp_uint32 *, &queue->tq_flags),
1954
                         TQF_IS_LAST_TASK);
1954
                         TQF_IS_LAST_TASK);
1955
#else
1955
#else
(-)a/runtime/src/kmp_utility.cpp (-2 / +2 lines)
Lines 19-25 Link Here
19
19
20
static const char *unknown = "unknown";
20
static const char *unknown = "unknown";
21
21
22
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
22
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
23
23
24
/* NOTE: If called before serial_initialize (i.e. from runtime_initialize), then
24
/* NOTE: If called before serial_initialize (i.e. from runtime_initialize), then
25
   the debugging package has not been initialized yet, and only "0" will print
25
   the debugging package has not been initialized yet, and only "0" will print
Lines 288-294 void __kmp_query_cpuid(kmp_cpuinfo_t *p) { Link Here
288
  }
288
  }
289
}
289
}
290
290
291
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
291
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
292
292
293
void __kmp_expand_host_name(char *buffer, size_t size) {
293
void __kmp_expand_host_name(char *buffer, size_t size) {
294
  KMP_DEBUG_ASSERT(size >= sizeof(unknown));
294
  KMP_DEBUG_ASSERT(size >= sizeof(unknown));
(-)a/runtime/src/z_Linux_asm.S (-4 / +4 lines)
Lines 18-24 Link Here
18
18
19
#include "kmp_config.h"
19
#include "kmp_config.h"
20
20
21
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
21
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
22
22
23
# if KMP_MIC
23
# if KMP_MIC
24
// the 'delay r16/r32/r64' should be used instead of the 'pause'.
24
// the 'delay r16/r32/r64' should be used instead of the 'pause'.
Lines 213-219 __kmp_unnamed_critical_addr: Link Here
213
#endif /* KMP_GOMP_COMPAT */
213
#endif /* KMP_GOMP_COMPAT */
214
214
215
215
216
#if KMP_ARCH_X86 && !KMP_ARCH_PPC64
216
#if (KMP_ARCH_X86 || KMP_ARCH_X86_X32) && !KMP_ARCH_PPC64
217
217
218
// -----------------------------------------------------------------------
218
// -----------------------------------------------------------------------
219
// microtasking routines specifically written for IA-32 architecture
219
// microtasking routines specifically written for IA-32 architecture
Lines 671-677 KMP_LABEL(invoke_3): Link Here
671
#endif /* KMP_ARCH_X86 */
671
#endif /* KMP_ARCH_X86 */
672
672
673
673
674
#if KMP_ARCH_X86_64
674
#if KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
675
675
676
// -----------------------------------------------------------------------
676
// -----------------------------------------------------------------------
677
// microtasking routines specifically written for IA-32 architecture and
677
// microtasking routines specifically written for IA-32 architecture and
Lines 1361-1367 KMP_LABEL(kmp_1_exit): Link Here
1361
1361
1362
1362
1363
// -----------------------------------------------------------------------
1363
// -----------------------------------------------------------------------
1364
#endif /* KMP_ARCH_X86_64 */
1364
#endif /* KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1365
1365
1366
// '
1366
// '
1367
#if (KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64
1367
#if (KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64
(-)a/runtime/src/z_Linux_util.cpp (-8 / +8 lines)
Lines 302-308 int __kmp_futex_determine_capable() { Link Here
302
302
303
#endif // KMP_USE_FUTEX
303
#endif // KMP_USE_FUTEX
304
304
305
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64) && (!KMP_ASM_INTRINS)
305
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32) && (!KMP_ASM_INTRINS)
306
/* Only 32-bit "add-exchange" instruction on IA-32 architecture causes us to
306
/* Only 32-bit "add-exchange" instruction on IA-32 architecture causes us to
307
   use compare_and_store for these routines */
307
   use compare_and_store for these routines */
308
308
Lines 418-424 kmp_uint64 __kmp_test_then_and64(volatile kmp_uint64 *p, kmp_uint64 d) { Link Here
418
  return old_value;
418
  return old_value;
419
}
419
}
420
420
421
#endif /* (KMP_ARCH_X86 || KMP_ARCH_X86_64) && (! KMP_ASM_INTRINS) */
421
#endif /* (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32) && (! KMP_ASM_INTRINS) */
422
422
423
void __kmp_terminate_thread(int gtid) {
423
void __kmp_terminate_thread(int gtid) {
424
  int status;
424
  int status;
Lines 531-542 static void *__kmp_launch_worker(void *thr) { Link Here
531
  KMP_CHECK_SYSFAIL("pthread_setcancelstate", status);
531
  KMP_CHECK_SYSFAIL("pthread_setcancelstate", status);
532
#endif
532
#endif
533
533
534
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
534
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
535
  // Set FP control regs to be a copy of the parallel initialization thread's.
535
  // Set FP control regs to be a copy of the parallel initialization thread's.
536
  __kmp_clear_x87_fpu_status_word();
536
  __kmp_clear_x87_fpu_status_word();
537
  __kmp_load_x87_fpu_control_word(&__kmp_init_x87_fpu_control_word);
537
  __kmp_load_x87_fpu_control_word(&__kmp_init_x87_fpu_control_word);
538
  __kmp_load_mxcsr(&__kmp_init_mxcsr);
538
  __kmp_load_mxcsr(&__kmp_init_mxcsr);
539
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
539
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
540
540
541
#ifdef KMP_BLOCK_SIGNALS
541
#ifdef KMP_BLOCK_SIGNALS
542
  status = sigfillset(&new_set);
542
  status = sigfillset(&new_set);
Lines 1806-1816 void __kmp_runtime_initialize(void) { Link Here
1806
    return;
1806
    return;
1807
  }
1807
  }
1808
1808
1809
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64)
1809
#if (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32)
1810
  if (!__kmp_cpuinfo.initialized) {
1810
  if (!__kmp_cpuinfo.initialized) {
1811
    __kmp_query_cpuid(&__kmp_cpuinfo);
1811
    __kmp_query_cpuid(&__kmp_cpuinfo);
1812
  }
1812
  }
1813
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */
1813
#endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 */
1814
1814
1815
  __kmp_xproc = __kmp_get_xproc();
1815
  __kmp_xproc = __kmp_get_xproc();
1816
1816
Lines 1917-1923 kmp_uint64 __kmp_now_nsec() { Link Here
1917
  return KMP_NSEC_PER_SEC * t.tv_sec + 1000 * t.tv_usec;
1917
  return KMP_NSEC_PER_SEC * t.tv_sec + 1000 * t.tv_usec;
1918
}
1918
}
1919
1919
1920
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
1920
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
1921
/* Measure clock ticks per millisecond */
1921
/* Measure clock ticks per millisecond */
1922
void __kmp_initialize_system_tick() {
1922
void __kmp_initialize_system_tick() {
1923
  kmp_uint64 delay = 100000; // 50~100 usec on most machines.
1923
  kmp_uint64 delay = 100000; // 50~100 usec on most machines.
Lines 2267-2273 finish: // Clean up and exit. Link Here
2267
2267
2268
#endif // USE_LOAD_BALANCE
2268
#endif // USE_LOAD_BALANCE
2269
2269
2270
#if !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_MIC ||                            \
2270
#if !(KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32 || KMP_MIC ||                            \
2271
      ((KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64) || KMP_ARCH_PPC64)
2271
      ((KMP_OS_LINUX || KMP_OS_DARWIN) && KMP_ARCH_AARCH64) || KMP_ARCH_PPC64)
2272
2272
2273
// we really only need the case with 1 argument, because CLANG always build
2273
// we really only need the case with 1 argument, because CLANG always build
(-)a/runtime/test/ompt/callback.h (-1 / +1 lines)
Lines 105-111 ompt_label_##id: Link Here
105
  define_ompt_label(id) \
105
  define_ompt_label(id) \
106
  print_possible_return_addresses(get_ompt_label_address(id))
106
  print_possible_return_addresses(get_ompt_label_address(id))
107
107
108
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
108
#if KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_X86_X32
109
// On X86 the NOP instruction is 1 byte long. In addition, the comiler inserts
109
// On X86 the NOP instruction is 1 byte long. In addition, the comiler inserts
110
// a MOV instruction for non-void runtime functions which is 3 bytes long.
110
// a MOV instruction for non-void runtime functions which is 3 bytes long.
111
#define print_possible_return_addresses(addr) \
111
#define print_possible_return_addresses(addr) \

Return to bug 571228