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 | 13af03286e718f9542afaf8684ff7a82ab68a5f3 (patch) | |
| tree | 668e607a4e9e05692c3939a7224b135a1be2c5cf | |
| parent | b56c50f0ecd6623bf29115c545b8e1fcf95e8e44 (diff) | |
| download | bcm5719-llvm-13af03286e718f9542afaf8684ff7a82ab68a5f3.tar.gz bcm5719-llvm-13af03286e718f9542afaf8684ff7a82ab68a5f3.zip | |
[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
llvm-svn: 243384
| -rw-r--r-- | compiler-rt/lib/ubsan/ubsan_value.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_value.cc b/compiler-rt/lib/ubsan/ubsan_value.cc index 215c1956a5c..4ae385faeb9 100644 --- a/compiler-rt/lib/ubsan/ubsan_value.cc +++ b/compiler-rt/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); |

