From: Jos v.d.V. <jo...@us...> - 2015-01-10 17:12:55
|
Update of /cvsroot/win32forth/win32forth/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25301 Modified Files: 486ASM.F 586ASMCM.f Log Message: Jos Solved a number of issues. Only 8 to go. Index: 586ASMCM.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/586ASMCM.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** 586ASMCM.f 25 Dec 2014 13:55:00 -0000 1.7 --- 586ASMCM.f 10 Jan 2015 17:12:53 -0000 1.8 *************** *** 16,35 **** 0x0F code-c, (xmm-compile) ; - : pre-xmm-compile ( param -- | x \ param -- | x \ x \ param -- ) - 0xF3 code-c, xmm-compile ; - : dxmm-compile ( param -- | x \ param -- | x \ x \ param -- ) 0x66 code-c, xmm-compile ; ! : pre-dxmm-compile ( param Pre -- | x \ param Pre -- | x \ x \ param Pre -- ) ! code-c, 0x0F code-c, mmxreg generic-entry2 mmx-dir? ! if 1 or ! endif ! xmm/mmx-prefix data-@ 2 = ! if xmm-dir? ! if 1 or ! endif ! endif ! ?noimmed code-c, compile-fields ; : F2-dxmm-compile ( param -- | x \ param -- | x \ x \ param -- ) --- 16,28 ---- 0x0F code-c, (xmm-compile) ; : dxmm-compile ( param -- | x \ param -- | x \ x \ param -- ) 0x66 code-c, xmm-compile ; ! ! : pre-xmm-compile ( param -- | x \ param -- | x \ x \ param -- ) ! 0xF3 code-c, xmm-compile ; ! ! : pre-dxmm-compile ( param -- | x \ param -- | x \ x \ param -- ) ! code-c, xmm-compile ; : F2-dxmm-compile ( param -- | x \ param -- | x \ x \ param -- ) *************** *** 42,45 **** --- 35,60 ---- 0xF3 pre-dxmm-compile ; + + : pf-compile1 ( param -- | x \ param -- | x \ x \ param -- ) + (mmx-dir?) + xmm/mmx-prefix data-@ 2 = + if xmm-dir? + if 1+ + endif + endif + ?noimmed code-c, compile-fields ; + + : 66-pf-compile1 ( param -- | x \ param -- | x \ x \ param -- ) + 0x66 code-c, 0x0F code-c, pf-compile1 ; + + : 0f-compile1 ( param -- | x \ param -- | x \ x \ param -- ) + 0x0F code-c, pf-compile1 ; + + : xmm-compile-no-disp ( param -- | x \ param -- | x \ x \ param -- ) + 0x0F code-c, true no-do-disp data-! (xmm-compile) ; + + : dxmm-compile-no-disp ( param -- | x \ param -- | x \ x \ param -- ) + 0x66 code-c, true no-do-disp data-! xmm-compile ; + in-asm dup-warning-off *************** *** 95,99 **** \ xmm instructions 0x10 ' xmm-compile opcode movups ! 0x10 ' dxmm-compile opcode movupd 0x10 ' pre-xmm-compile opcode movss --- 110,114 ---- \ xmm instructions 0x10 ' xmm-compile opcode movups ! 0x10 ' 66-dxmm-compile opcode movupd 0x10 ' pre-xmm-compile opcode movss *************** *** 111,140 **** 0x16 ' dxmm-compile opcode movhpd ! 0x28 ' xmm-compile opcode movaps ! 0x28 ' dxmm-compile opcode movapd 0x2A ' xmm-compile opcode cvtpi2ps - 0x2A ' dxmm-compile opcode cvtpi2pd 0x2A ' pre-xmm-compile opcode cvtsi2ss 0x2A ' F2-dxmm-compile opcode cvtsi2sd ! 0x2C ' xmm-compile opcode cvttps2pi ! 0x2C ' dxmm-compile opcode cvttpd2pi ! 0x2C ' pre-xmm-compile opcode cvttss2si ! 0x2C ' F2-dxmm-compile opcode cvttsd2si ! ! 0x2D ' xmm-compile opcode cvtps2pi ! 0x2D ' dxmm-compile opcode cvtpd2pi ! 0x2D ' pre-xmm-compile opcode cvtss2si ! 0x2D ' F2-dxmm-compile opcode cvtsd2si ! ! 0x2E ' xmm-compile opcode ucomiss ! 0x2E ' dxmm-compile opcode ucomisd ! ! 0x2F ' xmm-compile opcode comiss ! 0x2F ' dxmm-compile opcode comisd ! 0x50 ' xmm-compile opcode movmskps ! 0x50 ' dxmm-compile opcode movmskpd 0x51 ' xmm-compile opcode sqrtps --- 126,141 ---- 0x16 ' dxmm-compile opcode movhpd ! 0x28 ' 0f-compile1 opcode movaps ! 0x28 ' 66-pf-compile1 opcode movapd 0x2A ' xmm-compile opcode cvtpi2ps 0x2A ' pre-xmm-compile opcode cvtsi2ss 0x2A ' F2-dxmm-compile opcode cvtsi2sd ! \ 0x2E ' xmm-compile opcode ucomiss ! \ 0x2E ' dxmm-compile opcode ucomisd ! \ 0x2F ' xmm-compile opcode comiss ! \ 0x2F ' dxmm-compile opcode comisd 0x51 ' xmm-compile opcode sqrtps *************** *** 144,153 **** 0x52 ' xmm-compile opcode rsqrtps - 0x52 ' dxmm-compile opcode rsqrtpd 0x52 ' pre-xmm-compile opcode rsqrtss 0x52 ' F2-dxmm-compile opcode rsqrtsd 0x53 ' xmm-compile opcode rcpps - 0x53 ' dxmm-compile opcode rcppd 0x53 ' pre-xmm-compile opcode rcpss 0x53 ' F2-dxmm-compile opcode rcpds --- 145,152 ---- *************** *** 178,182 **** 0x5B ' xmm-compile opcode cvtdq2ps - 0x5B ' dxmm-compile opcode cvttpd2dq 0x5B ' 66-dxmm-compile opcode cvtps2dq 0x5B ' F3-dxmm-compile opcode cvttps2dq --- 177,180 ---- *************** *** 202,212 **** 0x5F ' F2-dxmm-compile opcode maxsd ! 0xC2 ' xmm-compile opcode cmpps ! 0xC2 ' dxmm-compile opcode cmppd ! 0xC2 ' pre-xmm-compile opcode cmpss ! 0xC2 ' F2-dxmm-compile opcode xcmpsd ! 0xC6 ' xmm-compile opcode shufps ! 0xC6 ' dxmm-compile opcode shufpd 0xE6 ' pre-xmm-compile opcode cvtdq2pd --- 200,216 ---- 0x5F ' F2-dxmm-compile opcode maxsd ! 0x6E ' dxmm-compile opcode cvttpd2dq ! 0x6E ' 66-pf-compile1 opcode movd ! 0x6F ' 66-dxmm-compile opcode movdqa ! ! ! \ 0xC2 ' xmm-compile-no-disp opcode cmpps ! \ 0xC2 ' dxmm-compile opcode cmppd ! \ 0xC2 ' pre-xmm-compile opcode cmpss ! \ 0xC2 ' F2-dxmm-compile opcode xcmpsd ! ! 0xC6 ' xmm-compile-no-disp opcode shufps ! 0xC6 ' dxmm-compile-no-disp opcode shufpd 0xE6 ' pre-xmm-compile opcode cvtdq2pd Index: 486ASM.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/486ASM.F,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** 486ASM.F 12 Dec 2014 12:20:38 -0000 1.12 --- 486ASM.F 10 Jan 2015 17:12:53 -0000 1.13 *************** *** 527,530 **** --- 527,531 ---- variable addmode ( addressing mode flags ) variable xmm/mmx-prefix \ xmm (2) or mmx (1) or neither (0) regs used ) + variable no-do-disp ( No change to the mod-r/m byte ) : reset-vars ( store 0 into all instruction coding variables ) *************** *** 1253,1258 **** : do-disp ( process a displacement ) ( -- ) ! mod-r/m data-@ dup 0bf > if c0-8* then 5 + a16bit? if 1+ then ! code-c, has-full-off ; : do-[reg*n] ( process a naked index ) ( -- ) --- 1254,1262 ---- : do-disp ( process a displacement ) ( -- ) ! mod-r/m data-@ no-do-disp data-@ ! if false no-do-disp data-! code-c, ! else dup 0bf > if c0-8* then ! 5 + a16bit? if 1+ then code-c, has-full-off ! then ; : do-[reg*n] ( process a naked index ) ( -- ) *************** *** 1787,1794 **** endcase ; ! : (xmm-compile) ( param -- | x \ param -- | x \ x \ param -- ) mmxreg generic-entry2 mmx-dir? if 10 or endif xmm/mmx-prefix data-@ 2 = if xmm-dir? --- 1791,1802 ---- endcase ; ! : (mmx-dir?) ( x \ param -- n ) mmxreg generic-entry2 mmx-dir? if 10 or endif + ; + + : (xmm-compile) ( param -- | x \ param -- | x \ x \ param -- ) + (mmx-dir?) xmm/mmx-prefix data-@ 2 = if xmm-dir? *************** *** 1799,1803 **** ; - ( the instructions ) in-asm --- 1807,1810 ---- |