mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:58:11 +00:00
AK+LibX86: Generalize u128/256 to AK::UFixedBigInt
Doing these as custom classes might be faster, especially when writing them in SSE, but this would cause a lot of Code duplication and due to the nature of constexprs and the intelligence of the compiler they might be using SSE/MMX either way
This commit is contained in:
parent
9270fb1e69
commit
5ffe23e4f3
11 changed files with 905 additions and 665 deletions
|
@ -1855,9 +1855,10 @@ void SoftCPU::FLD_RM80(const X86::Instruction& insn)
|
|||
// long doubles can be up to 128 bits wide in memory for reasons (alignment) and only uses 80 bits of precision
|
||||
// GCC uses 12 bytes in 32 bit and 16 bytes in 64 bit mode
|
||||
// so in the 32 bit case we read a bit to much, but that shouldn't be an issue.
|
||||
auto new_f80 = insn.modrm().read128(*this, insn);
|
||||
// FIXME: Respect shadow values
|
||||
fpu_push(*(long double*)new_f80.value().bytes());
|
||||
auto new_f80 = insn.modrm().read128(*this, insn).value();
|
||||
|
||||
fpu_push(*(long double*)new_f80.bytes().data());
|
||||
}
|
||||
|
||||
void SoftCPU::FUCOMI(const X86::Instruction& insn)
|
||||
|
@ -1908,7 +1909,7 @@ void SoftCPU::FSTP_RM80(const X86::Instruction& insn)
|
|||
if constexpr (sizeof(long double) == 12)
|
||||
f80 = insn.modrm().read128(*this, insn).value();
|
||||
|
||||
*(long double*)f80.bytes() = fpu_pop();
|
||||
*(long double*)f80.bytes().data() = fpu_pop();
|
||||
|
||||
insn.modrm().write128(*this, insn, shadow_wrap_as_initialized(f80));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue