[Openmp-commits] [openmp] [OpenMP] Provide big-endian bitfield definitions (PR #69995)

Ilya Leoshkevich via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 24 01:55:53 PDT 2023


iii-i wrote:

If we were doing just that, it would be totally fine. However, there is code that bitcasts ints to these structs like this:

```
kmp_task_t *__kmpc_omp_task_alloc(ident_t *loc_ref, kmp_int32 gtid,
                                  kmp_int32 flags, size_t sizeof_kmp_task_t,
                                  size_t sizeof_shareds,
                                  kmp_routine_entry_t task_entry) {
  kmp_task_t *retval;
  kmp_tasking_flags_t *input_flags = (kmp_tasking_flags_t *)&flags;
```

That's where big- and little-endian differ.

https://github.com/llvm/llvm-project/pull/69995


More information about the Openmp-commits mailing list