diff options
author | Sagar Thakur <sagar.thakur@imgtec.com> | 2015-07-28 05:51:51 +0000 |
---|---|---|
committer | Sagar Thakur <sagar.thakur@imgtec.com> | 2015-07-28 05:51:51 +0000 |
commit | 2c3c8704d8ea37990fac5a258befe01122449170 (patch) | |
tree | d804227907f78964275a05b01b04f333d8463f8b /lib/ubsan/ubsan_value.cc | |
parent | ed2557b2f30f60149108cb92a03460b614f7a688 (diff) |
[UBSan][MIPS] Fix cast-overflow tests for mips big endian
This fixes the bug https://llvm.org/bugs/show_bug.cgi?id=24152
The float value resides in the first 4 bytes of ValueHandle for both mips and mipsel.
Reviewers: dsanders, samsonov
Subscibers: rsmith, hans, mohit.bhakkad, jaydeep, llvm-commits
Differential: http://reviews.llvm.org/D11448
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_value.cc')
-rw-r--r-- | lib/ubsan/ubsan_value.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ubsan/ubsan_value.cc b/lib/ubsan/ubsan_value.cc index 215c1956a..4ae385fae 100644 --- a/lib/ubsan/ubsan_value.cc +++ b/lib/ubsan/ubsan_value.cc @@ -83,7 +83,7 @@ FloatMax Value::getFloatValue() const { #endif case 32: { float Value; -#if defined(__BIG_ENDIAN__) +#if defined(__BIG_ENDIAN__) && !defined(__mips__) // For big endian the float value is in the second 4 bytes // instead of the first 4 bytes. internal_memcpy(&Value, ((const char*)&Val)+4, 4); |