From: Frode Solheim Date: Mon, 12 Oct 2015 21:24:48 +0000 (+0200) Subject: Revert "JIT: Fix fldcw_m_indexed for x86-64" X-Git-Tag: 3200~32^2~1 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=ab00229084587b749a151b1827196511332504c4;p=francis%2Fwinuae.git Revert "JIT: Fix fldcw_m_indexed for x86-64" This reverts commit e71841283e993b4ed968b7b0de30a52d5a1c26b8. --- diff --git a/jit/codegen_x86.cpp b/jit/codegen_x86.cpp index b5cfb05d..bb964634 100644 --- a/jit/codegen_x86.cpp +++ b/jit/codegen_x86.cpp @@ -4230,9 +4230,6 @@ LENDFUNC(NONE,NONE,2,raw_fmov_rr,(FW d, FR s)) LOWFUNC(NONE,READ,2,raw_fldcw_m_indexed,(R4 index, IMM base)) { - /* FLDCW cannot be used with x86-64-only registers */ - assert(index <= EDI_INDEX); - ADDR32 emit_byte(0xd9); emit_byte(0xa8+index); emit_long(base); diff --git a/jit/compemu_midfunc_x86.cpp b/jit/compemu_midfunc_x86.cpp index f228830f..7a6af352 100644 --- a/jit/compemu_midfunc_x86.cpp +++ b/jit/compemu_midfunc_x86.cpp @@ -2542,8 +2542,9 @@ MENDFUNC(2,fmov_rr,(FW d, FR s)) MIDFUNC(2,fldcw_m_indexed,(RR4 index, IMM base)) { - index = readreg_x86(index, 4); - raw_fldcw_m_indexed(index, base); + index=readreg(index,4); + + raw_fldcw_m_indexed(index,base); unlock2(index); } MENDFUNC(2,fldcw_m_indexed,(RR4 index, IMM base)) diff --git a/jit/compemu_support.cpp b/jit/compemu_support.cpp index 433a6437..51508613 100644 --- a/jit/compemu_support.cpp +++ b/jit/compemu_support.cpp @@ -2009,27 +2009,6 @@ static int readreg_offset(int r, int size) return readreg_general(r,size,-1,1); } -#ifdef UAE -/* Allocate midlevel register to physical x86(-64) register, but make sure - * it is one of the (32-bit) x86 general purpose registers. */ -static int readreg_x86(int r, int size) -{ - /* First, try to use the normal register allocation routine. */ - int s = readreg(r, size); -#ifdef CPU_x86_64 - if (s > EDI_INDEX) { - /* We got a x86-64-specific register */ - jit_log("Got register %d in readreg_x86, must re-assign", s); - unlock2(s); - /* It would be better to loop through live.nat and find a - * suitable register which does not need saving to memory. */ - s = readreg_specific(r, size, EDI_INDEX); - } -#endif - return s; -} -#endif - /* writereg_general(r, size, spec) * * INPUT