Cosmos/source2/Compiler/Cosmos.Compiler.Assembler.X86/MoveSignExtend.cs
Trivalik_cp 51e893eb74 add movsx, fchs
implement neg CIL (needed for Abs())
fix floor and ceiling in range of int
add sign extension to LdArg and LdLoc
remove unneeded math functions, like min,max,abs
2011-09-02 21:03:14 +00:00

24 lines
No EOL
580 B
C#

namespace Cosmos.Compiler.Assembler.X86 {
[OpCode("movsx")]
public class MoveSignExtend : InstructionWithDestinationAndSourceAndSize
{
public override void WriteText(Assembler aAssembler, System.IO.TextWriter aOutput)
{
if (Size == 0)
{
Size = 32;
}
aOutput.Write(mMnemonic);
if (!DestinationEmpty)
{
aOutput.Write(" ");
aOutput.Write(this.GetDestinationAsString());
aOutput.Write(", ");
aOutput.Write(SizeToString(Size));
aOutput.Write(" ");
aOutput.Write(this.GetSourceAsString());
}
}
}
}