mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
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
24 lines
No EOL
580 B
C#
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());
|
|
}
|
|
}
|
|
}
|
|
} |