summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-08-16 06:20:35 +0200
committerbunnei <bunneidev@gmail.com>2015-08-16 06:20:35 +0200
commit5989a6ac5719504d60ed991ed5392e1da2297ed9 (patch)
tree4f03d85d35559f5e3b09399cfd6fd340c4a1fa39 /src
parentMerge pull request #1031 from bbarenblat/master (diff)
parentvfp: use std::swap where applicable (diff)
downloadyuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.tar
yuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.tar.gz
yuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.tar.bz2
yuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.tar.lz
yuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.tar.xz
yuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.tar.zst
yuzu-5989a6ac5719504d60ed991ed5392e1da2297ed9.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpdouble.cpp9
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpsingle.cpp9
2 files changed, 6 insertions, 12 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
index 1d844a66e..47a9fe804 100644
--- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
@@ -51,6 +51,7 @@
* ===========================================================================
*/
+#include <algorithm>
#include "common/logging/log.h"
#include "core/arm/skyeye_common/vfp/vfp.h"
#include "core/arm/skyeye_common/vfp/vfp_helper.h"
@@ -785,9 +786,7 @@ u32 vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,struct vfp_dou
* This ensures that NaN propagation works correctly.
*/
if (vdn->exponent < vdm->exponent) {
- struct vfp_double *t = vdn;
- vdn = vdm;
- vdm = t;
+ std::swap(vdm, vdn);
}
/*
@@ -843,9 +842,7 @@ vfp_double_multiply(struct vfp_double *vdd, struct vfp_double *vdn,
* This ensures that NaN propagation works correctly.
*/
if (vdn->exponent < vdm->exponent) {
- struct vfp_double *t = vdn;
- vdn = vdm;
- vdm = t;
+ std::swap(vdm, vdn);
LOG_TRACE(Core_ARM11, "VFP: swapping M <-> N\n");
}
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
index e5d339252..0fb3c3bf1 100644
--- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
@@ -51,6 +51,7 @@
* ===========================================================================
*/
+#include <algorithm>
#include <cinttypes>
#include "common/common_funcs.h"
@@ -815,9 +816,7 @@ vfp_single_add(struct vfp_single *vsd, struct vfp_single *vsn,
* This ensures that NaN propagation works correctly.
*/
if (vsn->exponent < vsm->exponent) {
- struct vfp_single *t = vsn;
- vsn = vsm;
- vsm = t;
+ std::swap(vsm, vsn);
}
/*
@@ -872,9 +871,7 @@ vfp_single_multiply(struct vfp_single *vsd, struct vfp_single *vsn, struct vfp_s
* This ensures that NaN propagation works correctly.
*/
if (vsn->exponent < vsm->exponent) {
- struct vfp_single *t = vsn;
- vsn = vsm;
- vsm = t;
+ std::swap(vsm, vsn);
LOG_TRACE(Core_ARM11, "swapping M <-> N");
}