summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpdouble.cpp6
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpsingle.cpp6
-rw-r--r--src/core/hle/kernel/process.cpp6
-rw-r--r--src/video_core/pica.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
index ab9fec39d..f91049585 100644
--- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
@@ -531,7 +531,7 @@ static u32 vfp_double_fsito(ARMul_State* state, int dd, int unused, int dm, u32
531 LOG_TRACE(Core_ARM11, "In %s\n", __FUNCTION__); 531 LOG_TRACE(Core_ARM11, "In %s\n", __FUNCTION__);
532 vdm.sign = (m & 0x80000000) >> 16; 532 vdm.sign = (m & 0x80000000) >> 16;
533 vdm.exponent = 1023 + 63 - 1; 533 vdm.exponent = 1023 + 63 - 1;
534 vdm.significand = vdm.sign ? -m : m; 534 vdm.significand = vdm.sign ? (~m + 1) : m;
535 535
536 return vfp_double_normaliseround(state, dd, &vdm, fpscr, 0, "fsito"); 536 return vfp_double_normaliseround(state, dd, &vdm, fpscr, 0, "fsito");
537} 537}
@@ -669,7 +669,7 @@ static u32 vfp_double_ftosi(ARMul_State* state, int sd, int unused, int dm, u32
669 exceptions |= FPSCR_IXC; 669 exceptions |= FPSCR_IXC;
670 670
671 if (vdm.sign) 671 if (vdm.sign)
672 d = -d; 672 d = (~d + 1);
673 } else { 673 } else {
674 d = 0; 674 d = 0;
675 if (vdm.exponent | vdm.significand) { 675 if (vdm.exponent | vdm.significand) {
@@ -817,7 +817,7 @@ u32 vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,struct vfp_dou
817 m_sig = vdn->significand - m_sig; 817 m_sig = vdn->significand - m_sig;
818 if ((s64)m_sig < 0) { 818 if ((s64)m_sig < 0) {
819 vdd->sign = vfp_sign_negate(vdd->sign); 819 vdd->sign = vfp_sign_negate(vdd->sign);
820 m_sig = -m_sig; 820 m_sig = (~m_sig + 1);
821 } else if (m_sig == 0) { 821 } else if (m_sig == 0) {
822 vdd->sign = (fpscr & FPSCR_RMODE_MASK) == 822 vdd->sign = (fpscr & FPSCR_RMODE_MASK) ==
823 FPSCR_ROUND_MINUSINF ? 0x8000 : 0; 823 FPSCR_ROUND_MINUSINF ? 0x8000 : 0;
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
index 4dfe0254d..a692c1909 100644
--- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
@@ -388,7 +388,7 @@ sqrt_invalid:
388 } else { 388 } else {
389 u64 term; 389 u64 term;
390 s64 rem; 390 s64 rem;
391 vsm.significand <<= !(vsm.exponent & 1); 391 vsm.significand <<= static_cast<u32>((vsm.exponent & 1) == 0);
392 term = (u64)vsd.significand * vsd.significand; 392 term = (u64)vsd.significand * vsd.significand;
393 rem = ((u64)vsm.significand << 32) - term; 393 rem = ((u64)vsm.significand << 32) - term;
394 394
@@ -691,7 +691,7 @@ static u32 vfp_single_ftosi(ARMul_State* state, int sd, int unused, s32 m, u32 f
691 exceptions |= FPSCR_IXC; 691 exceptions |= FPSCR_IXC;
692 692
693 if (vsm.sign) 693 if (vsm.sign)
694 d = 0-d; 694 d = (~d + 1);
695 } else { 695 } else {
696 d = 0; 696 d = 0;
697 if (vsm.exponent | vsm.significand) { 697 if (vsm.exponent | vsm.significand) {
@@ -843,7 +843,7 @@ vfp_single_add(struct vfp_single *vsd, struct vfp_single *vsn,
843 m_sig = vsn->significand - m_sig; 843 m_sig = vsn->significand - m_sig;
844 if ((s32)m_sig < 0) { 844 if ((s32)m_sig < 0) {
845 vsd->sign = vfp_sign_negate(vsd->sign); 845 vsd->sign = vfp_sign_negate(vsd->sign);
846 m_sig = 0-m_sig; 846 m_sig = (~m_sig + 1);
847 } else if (m_sig == 0) { 847 } else if (m_sig == 0) {
848 vsd->sign = (fpscr & FPSCR_RMODE_MASK) == 848 vsd->sign = (fpscr & FPSCR_RMODE_MASK) ==
849 FPSCR_ROUND_MINUSINF ? 0x8000 : 0; 849 FPSCR_ROUND_MINUSINF ? 0x8000 : 0;
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index b5c87e883..b0e75ba59 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -28,7 +28,7 @@ SharedPtr<Process> Process::Create(std::string name, u64 program_id) {
28} 28}
29 29
30void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) { 30void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) {
31 for (int i = 0; i < len; ++i) { 31 for (size_t i = 0; i < len; ++i) {
32 u32 descriptor = kernel_caps[i]; 32 u32 descriptor = kernel_caps[i];
33 u32 type = descriptor >> 20; 33 u32 type = descriptor >> 20;
34 34
@@ -65,8 +65,8 @@ void Process::ParseKernelCaps(const u32* kernel_caps, size_t len) {
65 AddressMapping mapping; 65 AddressMapping mapping;
66 mapping.address = descriptor << 12; 66 mapping.address = descriptor << 12;
67 mapping.size = (end_desc << 12) - mapping.address; 67 mapping.size = (end_desc << 12) - mapping.address;
68 mapping.writable = descriptor & (1 << 20); 68 mapping.writable = (descriptor & (1 << 20)) != 0;
69 mapping.unk_flag = end_desc & (1 << 20); 69 mapping.unk_flag = (end_desc & (1 << 20)) != 0;
70 70
71 address_mappings.push_back(mapping); 71 address_mappings.push_back(mapping);
72 } else if ((type & 0xFFF) == 0xFFE) { // 0x000F 72 } else if ((type & 0xFFF) == 0xFFE) { // 0x000F
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index 3fbf95721..e9bc7fb3b 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -614,7 +614,7 @@ struct Regs {
614 } 614 }
615 615
616 inline bool IsDefaultAttribute(int id) const { 616 inline bool IsDefaultAttribute(int id) const {
617 return (id >= 12) || (attribute_mask & (1 << id)) != 0; 617 return (id >= 12) || (attribute_mask & (1ULL << id)) != 0;
618 } 618 }
619 619
620 inline int GetNumTotalAttributes() const { 620 inline int GetNumTotalAttributes() const {