mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 22:43:53 +00:00
Fix some GCC 4.7 issues with the new Orc remote JIT support
I'm still seeing GCC ICE locally, but figured I'd throw this at the wall & see if it sticks for the bots at least. Will continue investigating the ICE in any case. llvm-svn: 257367
This commit is contained in:
parent
a83ca40c36
commit
e31830eba8
@ -701,10 +701,11 @@ private:
|
||||
if (auto EC = call<ReserveMem>(Channel, Id, Size, Align))
|
||||
return EC;
|
||||
|
||||
if (auto EC = expect<ReserveMemResponse>(Channel, [&](TargetAddress Addr) {
|
||||
RemoteAddr = Addr;
|
||||
return std::error_code();
|
||||
}))
|
||||
if (std::error_code EC =
|
||||
expect<ReserveMemResponse>(Channel, [&](TargetAddress Addr) {
|
||||
RemoteAddr = Addr;
|
||||
return std::error_code();
|
||||
}))
|
||||
return EC;
|
||||
|
||||
return std::error_code();
|
||||
|
@ -163,13 +163,16 @@ private:
|
||||
typedef int (*IntVoidFnTy)();
|
||||
|
||||
IntVoidFnTy Fn = nullptr;
|
||||
if (auto EC = handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
|
||||
Fn = reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));
|
||||
return std::error_code();
|
||||
}))
|
||||
if (std::error_code EC =
|
||||
handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
|
||||
Fn = reinterpret_cast<IntVoidFnTy>(static_cast<uintptr_t>(Addr));
|
||||
return std::error_code();
|
||||
}))
|
||||
return EC;
|
||||
|
||||
DEBUG(dbgs() << " Calling " << reinterpret_cast<void *>(Fn) << "\n");
|
||||
DEBUG(dbgs() << " Calling "
|
||||
<< reinterpret_cast<void *>(reinterpret_cast<intptr_t>(Fn))
|
||||
<< "\n");
|
||||
int Result = Fn();
|
||||
DEBUG(dbgs() << " Result = " << Result << "\n");
|
||||
|
||||
@ -181,7 +184,7 @@ private:
|
||||
|
||||
MainFnTy Fn = nullptr;
|
||||
std::vector<std::string> Args;
|
||||
if (auto EC = handle<CallMain>(
|
||||
if (std::error_code EC = handle<CallMain>(
|
||||
Channel, [&](TargetAddress Addr, std::vector<std::string> &A) {
|
||||
Fn = reinterpret_cast<MainFnTy>(static_cast<uintptr_t>(Addr));
|
||||
Args = std::move(A);
|
||||
@ -207,10 +210,11 @@ private:
|
||||
typedef void (*VoidVoidFnTy)();
|
||||
|
||||
VoidVoidFnTy Fn = nullptr;
|
||||
if (auto EC = handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
|
||||
Fn = reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));
|
||||
return std::error_code();
|
||||
}))
|
||||
if (std::error_code EC =
|
||||
handle<CallIntVoid>(Channel, [&](TargetAddress Addr) {
|
||||
Fn = reinterpret_cast<VoidVoidFnTy>(static_cast<uintptr_t>(Addr));
|
||||
return std::error_code();
|
||||
}))
|
||||
return EC;
|
||||
|
||||
DEBUG(dbgs() << " Calling " << reinterpret_cast<void *>(Fn) << "\n");
|
||||
@ -387,7 +391,7 @@ private:
|
||||
std::error_code handleReadMem() {
|
||||
char *Src = nullptr;
|
||||
uint64_t Size = 0;
|
||||
if (auto EC =
|
||||
if (std::error_code EC =
|
||||
handle<ReadMem>(Channel, [&](TargetAddress RSrc, uint64_t RSize) {
|
||||
Src = reinterpret_cast<char *>(static_cast<uintptr_t>(RSrc));
|
||||
Size = RSize;
|
||||
@ -410,7 +414,7 @@ private:
|
||||
std::error_code handleReserveMem() {
|
||||
void *LocalAllocAddr = nullptr;
|
||||
|
||||
if (auto EC =
|
||||
if (std::error_code EC =
|
||||
handle<ReserveMem>(Channel, [&](ResourceIdMgr::ResourceId Id,
|
||||
uint64_t Size, uint32_t Align) {
|
||||
auto I = Allocators.find(Id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user