aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-06-27 10:38:57 -0700
committeriximeow <me@iximeow.net>2021-06-27 10:39:20 -0700
commitbc16a5069bc53aec217e8f3a8a269c0e53b7eed7 (patch)
tree864e5ed26d0b5954a613a0cd3fead07ee430eb4d
parentb468b923e7a8bd25a97e11e511fb4902341d7634 (diff)
remove support for nonexistent prefixes
-rw-r--r--Cargo.toml2
-rw-r--r--src/long_mode/display.rs7
-rw-r--r--src/long_mode/mod.rs4
3 files changed, 1 insertions, 12 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d140150..637ffe9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "yaxpeax-x86"
-version = "0.2.2"
+version = "0.3.0"
authors = [ "iximeow <me@iximeow.net>" ]
license = "0BSD"
repository = "http://git.iximeow.net/yaxpeax-x86/"
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index f235c6a..7532101 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -3323,11 +3323,8 @@ fn contextualize_intel<T: fmt::Write, Y: YaxColors>(instr: &Instruction, colors:
if instr.prefixes.rep_any() {
if [Opcode::MOVS, Opcode::CMPS, Opcode::LODS, Opcode::STOS, Opcode::INS, Opcode::OUTS].contains(&instr.opcode) {
- // only a few of you actually use the prefix...
if instr.prefixes.rep() {
write!(out, "rep ")?;
- } else if instr.prefixes.repz() {
- write!(out, "repz ")?;
} else if instr.prefixes.repnz() {
write!(out, "repnz ")?;
}
@@ -3444,8 +3441,6 @@ fn contextualize_c<T: fmt::Write, Y: YaxColors>(instr: &Instruction, _colors: &Y
// only a few of you actually use the prefix...
if instr.prefixes.rep() {
out.write_str("rep ")?;
- } else if instr.prefixes.repz() {
- out.write_str("repz ")?;
} else if instr.prefixes.repnz() {
out.write_str("repnz ")?;
} // TODO: other rep kinds?
@@ -3670,8 +3665,6 @@ impl <T: fmt::Write, Y: YaxColors> ShowContextual<u64, [Option<alloc::string::St
// only a few of you actually use the prefix...
if self.prefixes.rep() {
write!(out, "rep ")?;
- } else if self.prefixes.repz() {
- write!(out, "repz ")?;
} else if self.prefixes.repnz() {
write!(out, "repnz ")?;
}
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 895502f..59bb321 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -4373,10 +4373,6 @@ impl Prefixes {
#[inline]
fn set_rep(&mut self) { self.bits = (self.bits & 0xcf) | 0x10; }
#[inline]
- pub fn repz(&self) -> bool { self.bits & 0x30 == 0x20 }
- #[inline]
- fn set_repz(&mut self) { self.bits = (self.bits & 0xcf) | 0x20; }
- #[inline]
pub fn repnz(&self) -> bool { self.bits & 0x30 == 0x30 }
#[inline]
fn set_repnz(&mut self) { self.bits = (self.bits & 0xcf) | 0x30; }