Fix building on OS X 10.10

This commit is contained in:
Robert Xu 2015-02-10 23:17:39 -05:00
parent 73d63c508a
commit 00e637645c
6 changed files with 145 additions and 10 deletions

View file

@ -887,6 +887,20 @@ struct cast_ppu_gpr<u32, false>
}
};
template<>
struct cast_ppu_gpr<unsigned long, false>
{
__forceinline static u64 to_gpr(const unsigned long& value)
{
return value;
}
__forceinline static unsigned long from_gpr(const u64 reg)
{
return static_cast<unsigned long>(reg);
}
};
template<>
struct cast_ppu_gpr<u64, false>
{

View file

@ -61,7 +61,7 @@ struct VFS
struct links_sorter
{
bool operator()(const std::vector<std::string>& a, const std::vector<std::string>& b)
bool operator()(const std::vector<std::string>& a, const std::vector<std::string>& b) const
{
return b.size() < a.size();
}

View file

@ -252,7 +252,7 @@ public:
else
{
assert(!"Invalid ID type");
return{};
return std::set<u32>{};
}
}
};

View file

@ -84,6 +84,21 @@ namespace vm
}
};
template<>
struct cast_ptr<unsigned long>
{
__forceinline static u32 cast(const unsigned long addr, const char* func)
{
const u32 res = static_cast<u32>(addr);
if (res != addr)
{
vm::error(addr, func);
}
return res;
}
};
template<>
struct cast_ptr<u32>
{