<!--
	Assembler Encoding for the Test Mnemonic
	Version: 1.0.0
	Date Created:  2007-05-05
	Last Modified: 2007-05-05

	Designed for Pentium and higher x86 Processors in 32bit mode protected mode
	Optimized for Size

	Done list:
	o U/S8-32,Boolean

	To Do:
	o U/S48-256
-->
<encoding procfamily="x86" bitdepth="32" proc="Pentium">
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- Test Mnemonic -->
	<mnemonic name="Test" type="Compare1" option="Size">
		<!-- ********************************************************************************************************** -->
		<!-- Testing 8bit and Boolean values -->
		<codetypeset param0="U/S8,Boolean">
			<codeset param0="M" total="2" totalv="1"
				lostregs="al" endregs="al=@0.U8" endpipe="U">
				<line code="mov al, @0.U8" time="U 1" timev=" V1" comment="Get the value" />
				<line code="test al, al"   time="U*1" timev="U 1" comment="Test it" />
			</codeset>
			<codeset param0="R" total="1" totalv="0" endpipe="S">
				<line code="test @0.U8, @0.U8" time="U 1" timev=" V1" comment="Test it" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 16bit values -->
		<codetypeset param0="U/S16">
			<codeset param0="M" total="4" totalv="3"
				lostregs="ax" endregs="ax=@0.U16" endpipe="U">
				<line code="mov ax, @0.U16" time="U 1+1" timev=" V1+1" comment="Get the value" />
				<line code="test ax, ax"    time="U*1+1" timev="U 1+1" comment="Test it" />
			</codeset>
			<codeset param0="R" total="2" totalv="1" endpipe="S">
				<line code="test @0.U16, @0.U16" time="U 1+1" timev=" V1+1" comment="Test it" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 24bit values -->
		<codetypeset param0="U/S24">
			<codeset param0="M" total="1+?" totalv="1+?"
				lostregs="al,edx" endpipe="V">
				<line code="lea edx, @0.U8"          time="U 1"   timev=" V1" comment="Get a pointer to the value" />
				<line code="call Mnemonic_Test_US24" time="!V1+?"             comment="Test it" />
			</codeset>
			<codeset param0="R" total="1+?" totalv="1+?"
				lostregs="eax" endpipe="V">
				<line code="mov eax, @0.U32"           time="U 1"   timev=" V1" comment="Get the value" />
				<line code="call Mnemonic_Test_US24_R" time="!V1+?"             comment="Test it" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 32bit values -->
		<codetypeset param0="U/S32">
			<codeset param0="M" total="2" totalv="1"
				lostregs="eax" endregs="eax=@0.U32" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Get the value" />
				<line code="test eax, eax"   time="U*1" timev="U 1" comment="Test it" />
			</codeset>
			<codeset param0="R" total="1" totalv="0" endpipe="S">
				<line code="test @0.U32, @0.U32" time="U 1" timev=" V1" comment="Test it" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 48bit values -->
		<codetypeset param0="U/S48">
			<codeset param0="M" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
			<codeset param0="R" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 64bit values -->
		<codetypeset param0="U/S64">
			<codeset param0="M" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
			<codeset param0="R" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 128bit values -->
		<codetypeset param0="U/S128">
			<codeset param0="M" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
			<codeset param0="R" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Testing 256bit values -->
		<codetypeset param0="U/S256">
			<codeset param0="M" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
			<codeset param0="R" total="" totalv=""
				lostregs="" endregs="" endpipe="">
			</codeset>
		</codetypeset>
	</mnemonic>
</encoding>
