diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:52:37 +0000 |
commit | 067b0ac8a70ff539e3dbbe2be60c3ac441c8305b (patch) | |
tree | 261de59dded1643a4a128978fefa90ea5a193a50 /src/Unwind-EHABI.cpp | |
parent | cd5ff43da54e357cd6a79fea21f2ae1afb8d3660 (diff) |
Notes
Diffstat (limited to 'src/Unwind-EHABI.cpp')
-rw-r--r-- | src/Unwind-EHABI.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Unwind-EHABI.cpp b/src/Unwind-EHABI.cpp index 4ff5e318b5f10..a23ba2cc7e0e6 100644 --- a/src/Unwind-EHABI.cpp +++ b/src/Unwind-EHABI.cpp @@ -941,8 +941,13 @@ _Unwind_VRS_Pop(_Unwind_Context *context, _Unwind_VRS_RegClass regclass, // format 1", which is equivalent to FSTMD + a padding word. for (uint32_t i = first; i < end; ++i) { // SP is only 32-bit aligned so don't copy 64-bit at a time. - uint64_t value = *sp++; - value |= ((uint64_t)(*sp++)) << 32; + uint64_t w0 = *sp++; + uint64_t w1 = *sp++; +#ifdef __LITTLE_ENDIAN__ + uint64_t value = (w1 << 32) | w0; +#else + uint64_t value = (w0 << 32) | w1; +#endif if (_Unwind_VRS_Set(context, regclass, i, representation, &value) != _UVRSR_OK) return _UVRSR_FAILED; |