mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
just remove interpreter support for endianness mismatches. This was
really old code from when we were running sparcv9 bc files on x86 (before I ported llvm-gcc 3 to work on x86) :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79871 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -21,7 +21,6 @@
|
|||||||
#include "llvm/ModuleProvider.h"
|
#include "llvm/ModuleProvider.h"
|
||||||
#include "llvm/ExecutionEngine/GenericValue.h"
|
#include "llvm/ExecutionEngine/GenericValue.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/ADT/SmallVector.h"
|
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/MutexGuard.h"
|
#include "llvm/Support/MutexGuard.h"
|
||||||
@ -855,17 +854,6 @@ void ExecutionEngine::LoadValueFromMemory(GenericValue &Result,
|
|||||||
const Type *Ty) {
|
const Type *Ty) {
|
||||||
const unsigned LoadBytes = getTargetData()->getTypeStoreSize(Ty);
|
const unsigned LoadBytes = getTargetData()->getTypeStoreSize(Ty);
|
||||||
|
|
||||||
if (sys::isLittleEndianHost() != getTargetData()->isLittleEndian()) {
|
|
||||||
// Host and target are different endian - reverse copy the stored
|
|
||||||
// bytes into a buffer, and load from that.
|
|
||||||
uint8_t *Src = (uint8_t*)Ptr;
|
|
||||||
|
|
||||||
SmallVector<uint8_t, 20> Buf;
|
|
||||||
Buf.resize(LoadBytes+1);
|
|
||||||
std::reverse_copy(Src, Src + LoadBytes, Buf.data());
|
|
||||||
Ptr = (GenericValue*)Buf.data();
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (Ty->getTypeID()) {
|
switch (Ty->getTypeID()) {
|
||||||
case Type::IntegerTyID:
|
case Type::IntegerTyID:
|
||||||
// An APInt with all words initially zero.
|
// An APInt with all words initially zero.
|
||||||
|
Reference in New Issue
Block a user