[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
This commit is contained in:
parent
b56c50f0ec
commit
13af03286e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue