hypervisor: emulator: introduce get/set_op

Provide two helpers to get and set operands. This reduces repetition.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2020-12-05 22:16:23 +00:00
committed by Samuel Ortiz
parent 03b824be0b
commit 53c3b00fb0
2 changed files with 86 additions and 0 deletions

View File

@@ -52,6 +52,9 @@ pub enum PlatformError {
#[error("Unsupported CPU Mode: {0}")]
UnsupportedCpuMode(#[source] anyhow::Error),
#[error("Invalid instruction operand: {0}")]
InvalidOperand(#[source] anyhow::Error),
}
#[derive(Error, Debug)]