Cosmos/source/Indy.IL2CPU/Assembler/x86/386AndUp/SignExtendAX.cs
mterwoord_cp ffc211c161
2008-11-08 09:00:58 +00:00

29 lines
No EOL
513 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86
{
[OpCode(0xFFFFFFFF, "cdq")]
public class SignExtendAX : New_Instruction
{
private int mOldSize;
public SignExtendAX(int aOldSize)
{
mOldSize = aOldSize;
}
public override string ToString()
{
switch (mOldSize)
{
case 4:
return "cdq";
case 2:
return "cwd";
default:
throw new NotSupportedException();
}
}
}
}