mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-21 05:18:38 +00:00
Changes in Conv*, Ld* and St* opcodes so that values with size < 4 bytes are extended to 4 bytes. Implemented Not and Xor for values with size 8 bytes. Added tests for bitwise operations, arithmetic operations and Conv* opcodes.
24 lines
616 B
C#
24 lines
616 B
C#
namespace Cosmos.Assembler.x86 {
|
|
[Cosmos.Assembler.OpCode("movzx")]
|
|
public class MoveZeroExtend : InstructionWithDestinationAndSourceAndSize
|
|
{
|
|
|
|
public override void WriteText(Cosmos.Assembler.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());
|
|
}
|
|
}
|
|
}
|
|
}
|