emit_x64_vector_floating_point: Use arrays for retrieving size instead of hardcoding the size
Similar changes were done in emit_x64_vector, but these were missed.
This commit is contained in:
parent
af28e89a13
commit
9fc89f0a0e
1 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@ static void EmitVectorOperation32(BlockOfCode& code, EmitContext& ctx, IR::Inst*
|
||||||
code.movaps(xword[code.ABI_PARAM3], xmm_b);
|
code.movaps(xword[code.ABI_PARAM3], xmm_b);
|
||||||
code.CallFunction(static_cast<void(*)(std::array<u32, 4>&, const std::array<u32, 4>&, const std::array<u32, 4>&)>(
|
code.CallFunction(static_cast<void(*)(std::array<u32, 4>&, const std::array<u32, 4>&, const std::array<u32, 4>&)>(
|
||||||
[](std::array<u32, 4>& result, const std::array<u32, 4>& a, const std::array<u32, 4>& b) {
|
[](std::array<u32, 4>& result, const std::array<u32, 4>& a, const std::array<u32, 4>& b) {
|
||||||
for (size_t i = 0; i < 4; ++i) {
|
for (size_t i = 0; i < result.size(); ++i) {
|
||||||
if (auto r = Common::ProcessNaNs(a[i], b[i])) {
|
if (auto r = Common::ProcessNaNs(a[i], b[i])) {
|
||||||
result[i] = *r;
|
result[i] = *r;
|
||||||
} else if (Common::IsNaN(result[i])) {
|
} else if (Common::IsNaN(result[i])) {
|
||||||
|
@ -160,7 +160,7 @@ static void EmitVectorOperation64(BlockOfCode& code, EmitContext& ctx, IR::Inst*
|
||||||
code.movaps(xword[code.ABI_PARAM3], xmm_b);
|
code.movaps(xword[code.ABI_PARAM3], xmm_b);
|
||||||
code.CallFunction(static_cast<void(*)(std::array<u64, 2>&, const std::array<u64, 2>&, const std::array<u64, 2>&)>(
|
code.CallFunction(static_cast<void(*)(std::array<u64, 2>&, const std::array<u64, 2>&, const std::array<u64, 2>&)>(
|
||||||
[](std::array<u64, 2>& result, const std::array<u64, 2>& a, const std::array<u64, 2>& b) {
|
[](std::array<u64, 2>& result, const std::array<u64, 2>& a, const std::array<u64, 2>& b) {
|
||||||
for (size_t i = 0; i < 2; ++i) {
|
for (size_t i = 0; i < result.size(); ++i) {
|
||||||
if (auto r = Common::ProcessNaNs(a[i], b[i])) {
|
if (auto r = Common::ProcessNaNs(a[i], b[i])) {
|
||||||
result[i] = *r;
|
result[i] = *r;
|
||||||
} else if (Common::IsNaN(result[i])) {
|
} else if (Common::IsNaN(result[i])) {
|
||||||
|
|
Loading…
Reference in a new issue