mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 02:29:29 +00:00
Following up on MacOS build fix.
Specialisation of llvm_value_t to allow build with LLVM this time.
This commit is contained in:
parent
087dccd194
commit
082bbc7336
2 changed files with 38 additions and 10 deletions
|
@ -198,9 +198,9 @@ struct llvm_value_t<u16> : llvm_value_t<s16>
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct llvm_value_t<s32> : llvm_value_t<s8>
|
struct llvm_value_t<int> : llvm_value_t<s8>
|
||||||
{
|
{
|
||||||
using type = s32;
|
using type = int;
|
||||||
using base = llvm_value_t<s8>;
|
using base = llvm_value_t<s8>;
|
||||||
using base::base;
|
using base::base;
|
||||||
|
|
||||||
|
@ -213,10 +213,10 @@ struct llvm_value_t<s32> : llvm_value_t<s8>
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct llvm_value_t<u32> : llvm_value_t<s32>
|
struct llvm_value_t<uint> : llvm_value_t<int>
|
||||||
{
|
{
|
||||||
using type = u32;
|
using type = uint;
|
||||||
using base = llvm_value_t<s32>;
|
using base = llvm_value_t<int>;
|
||||||
using base::base;
|
using base::base;
|
||||||
|
|
||||||
static constexpr bool is_sint = false;
|
static constexpr bool is_sint = false;
|
||||||
|
@ -224,9 +224,35 @@ struct llvm_value_t<u32> : llvm_value_t<s32>
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct llvm_value_t<s64> : llvm_value_t<s8>
|
struct llvm_value_t<long> : llvm_value_t<s8>
|
||||||
{
|
{
|
||||||
using type = s64;
|
using type = long;
|
||||||
|
using base = llvm_value_t<s8>;
|
||||||
|
using base::base;
|
||||||
|
|
||||||
|
static constexpr uint esize = 8 * sizeof(long);
|
||||||
|
|
||||||
|
static llvm::Type* get_type(llvm::LLVMContext& context)
|
||||||
|
{
|
||||||
|
return llvm::Type::getInt64Ty(context);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct llvm_value_t<ulong> : llvm_value_t<long>
|
||||||
|
{
|
||||||
|
using type = ulong;
|
||||||
|
using base = llvm_value_t<long>;
|
||||||
|
using base::base;
|
||||||
|
|
||||||
|
static constexpr bool is_sint = false;
|
||||||
|
static constexpr bool is_uint = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct llvm_value_t<llong> : llvm_value_t<s8>
|
||||||
|
{
|
||||||
|
using type = llong;
|
||||||
using base = llvm_value_t<s8>;
|
using base = llvm_value_t<s8>;
|
||||||
using base::base;
|
using base::base;
|
||||||
|
|
||||||
|
@ -239,10 +265,10 @@ struct llvm_value_t<s64> : llvm_value_t<s8>
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct llvm_value_t<u64> : llvm_value_t<s64>
|
struct llvm_value_t<ullong> : llvm_value_t<llong>
|
||||||
{
|
{
|
||||||
using type = u64;
|
using type = ullong;
|
||||||
using base = llvm_value_t<s64>;
|
using base = llvm_value_t<llong>;
|
||||||
using base::base;
|
using base::base;
|
||||||
|
|
||||||
static constexpr bool is_sint = false;
|
static constexpr bool is_sint = false;
|
||||||
|
|
|
@ -47,8 +47,10 @@ const auto s_time_aux_info = []() -> time_aux_info_t
|
||||||
#define TIMER_ABSTIME -1
|
#define TIMER_ABSTIME -1
|
||||||
// The opengroup spec isn't clear on the mapping from REALTIME to CALENDAR being appropriate or not.
|
// The opengroup spec isn't clear on the mapping from REALTIME to CALENDAR being appropriate or not.
|
||||||
// http://pubs.opengroup.org/onlinepubs/009695299/basedefs/time.h.html
|
// http://pubs.opengroup.org/onlinepubs/009695299/basedefs/time.h.html
|
||||||
|
#ifndef CLOCK_REALTIME
|
||||||
#define CLOCK_REALTIME 1 // #define CALENDAR_CLOCK 1 from mach/clock_types.h
|
#define CLOCK_REALTIME 1 // #define CALENDAR_CLOCK 1 from mach/clock_types.h
|
||||||
#define CLOCK_MONOTONIC 0 // #define SYSTEM_CLOCK 0
|
#define CLOCK_MONOTONIC 0 // #define SYSTEM_CLOCK 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// the mach kernel uses struct mach_timespec, so struct timespec is loaded from <sys/_types/_timespec.h> for compatability
|
// the mach kernel uses struct mach_timespec, so struct timespec is loaded from <sys/_types/_timespec.h> for compatability
|
||||||
// struct timespec { time_t tv_sec; long tv_nsec; };
|
// struct timespec { time_t tv_sec; long tv_nsec; };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue