Skip to content

Commit

Permalink
Missing Code
Browse files Browse the repository at this point in the history
  • Loading branch information
enusbaum committed Jul 14, 2024
1 parent e0981ed commit 2e85660
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions MBBSEmu/CPU/CPUCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ private uint GetOperandValueUInt32(OpKind opKind, EnumOperandType operandType)
}

/// <summary>
/// OpKind and MemorySize
/// <summary>
/// This is a helper method which takes the resulting value from GetOperandValueUInt64 and signs it depending on the underlying
/// OpKind and MemorySize
Expand Down Expand Up @@ -2735,22 +2736,7 @@ private void Op_Imul_1operand()
[MethodImpl(OpcodeSubroutineCompilerOptimizations)]
private void Op_Imul_3operand()
{
var operand2 = _currentOperationSize switch
{
1 => GetOperandValueUInt8(_currentInstruction.Op1Kind, EnumOperandType.Source),
2 => GetOperandValueUInt16(_currentInstruction.Op1Kind, EnumOperandType.Source),
4 => GetOperandValueUInt32(_currentInstruction.Op1Kind, EnumOperandType.Source),
_ => throw new Exception("Unsupported Operation Size")
};

var operand3 = _currentOperationSize switch
{
1 => GetOperandValueUInt8(_currentInstruction.Op2Kind, EnumOperandType.Source),
2 => GetOperandValueUInt16(_currentInstruction.Op2Kind, EnumOperandType.Source),
4 => GetOperandValueUInt32(_currentInstruction.Op2Kind, EnumOperandType.Source),
_ => throw new Exception("Unsupported Operation Size")
uint result;
unchecked
switch (_currentOperationSize)
{
case 1:
Op_Imul_3operand_8();
Expand All @@ -2766,8 +2752,12 @@ private void Op_Imul_3operand()
}
}

WriteToDestination(result);
[MethodImpl(OpcodeSubroutineCompilerOptimizations)]
private void Op_Imul_3operand_8()
{
var operand2 = GetOperandValueInt8(_currentInstruction.Op1Kind, EnumOperandType.Source);

Check failure on line 2758 in MBBSEmu/CPU/CPUCore.cs

View workflow job for this annotation

GitHub Actions / build

The name 'GetOperandValueInt8' does not exist in the current context

Check failure on line 2758 in MBBSEmu/CPU/CPUCore.cs

View workflow job for this annotation

GitHub Actions / build

The name 'GetOperandValueInt8' does not exist in the current context
var operand3 = GetOperandValueInt8(_currentInstruction.Op2Kind, EnumOperandType.Source);

Check failure on line 2759 in MBBSEmu/CPU/CPUCore.cs

View workflow job for this annotation

GitHub Actions / build

The name 'GetOperandValueInt8' does not exist in the current context

Check failure on line 2759 in MBBSEmu/CPU/CPUCore.cs

View workflow job for this annotation

GitHub Actions / build

The name 'GetOperandValueInt8' does not exist in the current context
//Set CarryFlag and OverflowFlag if the result is too large to fit in the destination
}

[MethodImpl(OpcodeSubroutineCompilerOptimizations)]
Expand Down

0 comments on commit 2e85660

Please sign in to comment.