|
|
@ -2,6 +2,7 @@ |
|
|
|
|
|
|
|
#include "preprocessor/llvm_includes_start.h" |
|
|
|
#include <llvm/IR/IntrinsicInst.h> |
|
|
|
#include <llvm/Support/Host.h> |
|
|
|
#include "preprocessor/llvm_includes_end.h" |
|
|
|
|
|
|
|
#include "Type.h" |
|
|
@ -15,13 +16,7 @@ namespace jit |
|
|
|
|
|
|
|
llvm::Value* Endianness::bswapIfLE(llvm::IRBuilder<>& _builder, llvm::Value* _word) |
|
|
|
{ |
|
|
|
union tester |
|
|
|
{ |
|
|
|
unsigned int x; |
|
|
|
unsigned char isLE; |
|
|
|
}; |
|
|
|
|
|
|
|
if (tester{1}.isLE) |
|
|
|
if (llvm::sys::IsLittleEndianHost) |
|
|
|
{ |
|
|
|
// FIXME: Disabled because of problems with BYTE
|
|
|
|
//if (auto constant = llvm::dyn_cast<llvm::ConstantInt>(_word))
|
|
|
|