namespace X86Disassembler.X86.Operands;
///
/// Represents an FPU register operand (ST(0) to ST(7))
///
public class FPURegisterOperand : Operand
{
///
/// Gets the FPU register index (0-7)
///
public FpuRegisterIndex RegisterIndex { get; }
///
/// Initializes a new instance of the FPURegisterOperand class
///
/// The FPU register index (RegisterIndex.A to RegisterIndex.Di)
public FPURegisterOperand(FpuRegisterIndex registerIndex)
{
RegisterIndex = registerIndex;
}
///
/// Returns a string representation of the FPU register operand
///
/// A string representation of the FPU register operand
public override string ToString()
{
// Convert RegisterIndex to a numerical index (0-7)
int index = (int)RegisterIndex;
return $"ST({index})";
}
}