Merge pull request #12409 from liamwhite/bits-and-bytes

nce: fix read size in simd immediate emulation
master
Fernando S 2023-12-20 18:45:44 +07:00 committed by GitHub
commit f4f4a469a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

@ -39,7 +39,7 @@ fpsimd_context* GetFloatingPointState(mcontext_t& host_ctx) {
} }
using namespace Common::Literals; using namespace Common::Literals;
constexpr u32 StackSize = 32_KiB; constexpr u32 StackSize = 128_KiB;
} // namespace } // namespace

@ -249,6 +249,7 @@ bool InterpreterVisitor::LDR_lit_fpsimd(Imm<2> opc, Imm<19> imm19, Vec Vt) {
return false; return false;
} }
// Size in bytes
const u64 size = 4 << opc.ZeroExtend(); const u64 size = 4 << opc.ZeroExtend();
const u64 offset = imm19.SignExtend<u64>() << 2; const u64 offset = imm19.SignExtend<u64>() << 2;
const u64 address = this->GetPc() + offset; const u64 address = this->GetPc() + offset;
@ -530,7 +531,7 @@ bool InterpreterVisitor::SIMDImmediate(bool wback, bool postindex, size_t scale,
} }
case MemOp::Load: { case MemOp::Load: {
u128 data{}; u128 data{};
m_memory.ReadBlock(address, &data, datasize); m_memory.ReadBlock(address, &data, datasize / 8);
this->SetVec(Vt, data); this->SetVec(Vt, data);
break; break;
} }