aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-02-22 16:42:14 -0800
committeriximeow <me@iximeow.net>2020-02-22 16:59:39 -0800
commita2d4713dcae92cc16838c43f3a5e9703a1c926da (patch)
treea59d98a69e006d08020a3476876ddec3a37a8697
parent8ff519ef881231632f437c73676b1a86877686a4 (diff)
explicitly report x87 as not (yet) supported
-rw-r--r--README.md1
-rw-r--r--src/long_mode/mod.rs19
2 files changed, 12 insertions, 8 deletions
diff --git a/README.md b/README.md
index 32dc882..98b888d 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,7 @@ the canonical copy of `yaxpeax-x86` is at [https://git.iximeow.net/yaxpeax-x86/]
* `yaxpeax-x86` will, but does not yet, have decoders for protected-mode and real-mode `x86`. currently, `yaxpeax-x86` assumes that it is decoding long mode `x86_64` instructions. it is strongly recommended to use `<yaxpeax_x86::x86_64 as Arch>::Instruction` and similar type aliases, rather than using struct and operand types directly. user beware!
* avx512 is not yet supported. user beware!
* avx256 support is questionable. user beware!
+* x87 is not yet supported. user beware!
* ring-0 instructions have questionable support. user beware!
* the only unsafe code in `yaxpeax_x86` is instances of `unsafe { unreachable_unchecked(); }`. while these are, currently, all unreachable, this code should default to a fail-safe assertion fail, with `unreachable_unchecked` being an opt-in feature. user beware!
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 73570c1..a18a62c 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -4366,21 +4366,21 @@ const OPCODES: [OpcodeRecord; 256] = [
// XLAT
OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
// x86 d8
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 d9
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 da
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 db
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 dc
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 dd
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 de
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// x86 df
- OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
+ OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Unsupported),
// 0xe0
// LOOPNZ
OpcodeRecord(Interpretation::Instruction(Opcode::Invalid), OperandCode::Nothing),
@@ -5357,6 +5357,9 @@ fn read_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T,
}
fn unlikely_operands<T: Iterator<Item=u8>>(decoder: &InstDecoder, mut bytes_iter: T, instruction: &mut Instruction, operand_code: OperandCode, mem_oper: OperandSpec, length: &mut u8) -> Result<(), DecodeError> {
match operand_code {
+ OperandCode::Unsupported => {
+ return Err(DecodeError::IncompleteDecoder);
+ }
OperandCode::MOVQ_f30f => {
// if rex.w is set, the f3 prefix no longer applies and this becomes an 0f7e movq,
// rather than f30f7e movq.