diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-10-24 12:58:52 +0200 |
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-10-24 12:58:52 +0200 |
| commit | 856fd58549e5bf50e800a665f9deb27d967df2fb (patch) | |
| tree | 6950210e5ae3618b501a7045f10f8fc06dd903df /src/code/reference_decoder/sim86_instruction.cpp | |
| parent | d8b3ca9d02377cf04a09e0f518a3385b7324bc4d (diff) | |
checkpoint
Diffstat (limited to 'src/code/reference_decoder/sim86_instruction.cpp')
| -rw-r--r-- | src/code/reference_decoder/sim86_instruction.cpp | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/code/reference_decoder/sim86_instruction.cpp b/src/code/reference_decoder/sim86_instruction.cpp deleted file mode 100644 index 34fcf1f..0000000 --- a/src/code/reference_decoder/sim86_instruction.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* ======================================================================== - - (C) Copyright 2023 by Molly Rocket, Inc., All Rights Reserved. - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Please see https://computerenhance.com for more information - - ======================================================================== */ - -static b32 OperandIsType(instruction Instruction, u32 Index, operand_type Type) -{ - b32 Result = (Instruction.Operands[Index].Type == Type); - return Result; -} - -static instruction_operand GetOperand(instruction Instruction, u32 Index) -{ - assert(Index < ArrayCount(Instruction.Operands)); - instruction_operand Result = Instruction.Operands[Index]; - return Result; -} - -static register_access RegisterAccess(u32 Index, u32 Offset, u32 Count) -{ - register_access Result = {}; - - Result.Index = Index; - Result.Offset = Offset; - Result.Count = Count; - - return Result; -} - -static instruction_operand IntersegmentAddressOperand(u32 Segment, s32 Displacement) -{ - instruction_operand Result = {}; - - Result.Type = Operand_Memory; - Result.Address.ExplicitSegment = Segment; - Result.Address.Displacement = Displacement; - Result.Address.Flags = Address_ExplicitSegment; - - return Result; -} - -static instruction_operand EffectiveAddressOperand(register_access Term0, register_access Term1, s32 Displacement) -{ - instruction_operand Result = {}; - - Result.Type = Operand_Memory; - Result.Address.Terms[0].Register = Term0; - Result.Address.Terms[0].Scale = 1; - Result.Address.Terms[1].Register = Term1; - Result.Address.Terms[1].Scale = 1; - Result.Address.Displacement = Displacement; - - return Result; -} - -static instruction_operand RegisterOperand(u32 Index, u32 Count) -{ - instruction_operand Result = {}; - - Result.Type = Operand_Register; - Result.Register.Index = Index; - Result.Register.Offset = 0; - Result.Register.Count = Count; - - return Result; -} - -static instruction_operand ImmediateOperand(u32 Value, u32 Flags = 0) -{ - instruction_operand Result = {}; - - Result.Type = Operand_Immediate; - Result.Immediate.Value = Value; - Result.Immediate.Flags = Flags; - - return Result; -} |
