Use correct rounding mode on x86 and x86-64 recompiled versions of PF2ID. Fixes rendering errors on Unreal 3DNow! software renderer

This commit is contained in:
SarahW 2019-01-10 21:33:29 +00:00
commit 56a4d5cf83
6 changed files with 14 additions and 0 deletions

View file

@ -541,6 +541,11 @@ void host_x86_LDMXCSR(codeblock_t *block, void *p)
{
codegen_addbyte4(block, 0x0f, 0xae, 0x50 | REG_EBP, offset); /*LDMXCSR offset[EBP]*/
}
else if (offset < (1ull << 32))
{
codegen_addbyte3(block, 0x0f, 0xae, 0x90 | REG_EBP); /*LDMXCSR offset[EBP]*/
codegen_addlong(block, offset);
}
else
{
fatal("host_x86_LDMXCSR - out of range %p\n", p);