You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
449 B
25 lines
449 B
10 years ago
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <llvm/IR/IRBuilder.h>
|
||
|
|
||
|
namespace dev
|
||
|
{
|
||
|
namespace eth
|
||
|
{
|
||
|
namespace jit
|
||
|
{
|
||
|
|
||
|
struct Endianness
|
||
|
{
|
||
|
static llvm::Value* toBE(llvm::IRBuilder<>& _builder, llvm::Value* _word) { return bswapIfLE(_builder, _word); }
|
||
|
static llvm::Value* toNative(llvm::IRBuilder<>& _builder, llvm::Value* _word) { return bswapIfLE(_builder, _word); }
|
||
|
|
||
|
private:
|
||
|
static llvm::Value* bswapIfLE(llvm::IRBuilder<>& _builder, llvm::Value* _word);
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|