diff --git a/rpcs3/Emu/CPU/CPUTranslator.h b/rpcs3/Emu/CPU/CPUTranslator.h index 669e1d8238..c8db00a4db 100644 --- a/rpcs3/Emu/CPU/CPUTranslator.h +++ b/rpcs3/Emu/CPU/CPUTranslator.h @@ -198,9 +198,9 @@ struct llvm_value_t : llvm_value_t }; template <> -struct llvm_value_t : llvm_value_t +struct llvm_value_t : llvm_value_t { - using type = s32; + using type = int; using base = llvm_value_t; using base::base; @@ -213,10 +213,10 @@ struct llvm_value_t : llvm_value_t }; template <> -struct llvm_value_t : llvm_value_t +struct llvm_value_t : llvm_value_t { - using type = u32; - using base = llvm_value_t; + using type = uint; + using base = llvm_value_t; using base::base; static constexpr bool is_sint = false; @@ -224,9 +224,35 @@ struct llvm_value_t : llvm_value_t }; template <> -struct llvm_value_t : llvm_value_t +struct llvm_value_t : llvm_value_t { - using type = s64; + using type = long; + using base = llvm_value_t; + 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 : llvm_value_t +{ + using type = ulong; + using base = llvm_value_t; + using base::base; + + static constexpr bool is_sint = false; + static constexpr bool is_uint = true; +}; + +template <> +struct llvm_value_t : llvm_value_t +{ + using type = llong; using base = llvm_value_t; using base::base; @@ -239,10 +265,10 @@ struct llvm_value_t : llvm_value_t }; template <> -struct llvm_value_t : llvm_value_t +struct llvm_value_t : llvm_value_t { - using type = u64; - using base = llvm_value_t; + using type = ullong; + using base = llvm_value_t; using base::base; static constexpr bool is_sint = false; diff --git a/rpcs3/Emu/Cell/lv2/sys_time.cpp b/rpcs3/Emu/Cell/lv2/sys_time.cpp index 0dd7195843..2302406ac1 100644 --- a/rpcs3/Emu/Cell/lv2/sys_time.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_time.cpp @@ -47,8 +47,10 @@ const auto s_time_aux_info = []() -> time_aux_info_t #define TIMER_ABSTIME -1 // 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 +#ifndef CLOCK_REALTIME #define CLOCK_REALTIME 1 // #define CALENDAR_CLOCK 1 from mach/clock_types.h #define CLOCK_MONOTONIC 0 // #define SYSTEM_CLOCK 0 +#endif // the mach kernel uses struct mach_timespec, so struct timespec is loaded from for compatability // struct timespec { time_t tv_sec; long tv_nsec; };