aboutsummaryrefslogtreecommitdiff
path: root/src/generated
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2022-08-27 17:08:29 -0700
committeriximeow <me@iximeow.net>2023-01-02 08:50:23 -0800
commitd2b4f3d1a454c7bbcc487ddfb2839b01dc1c9c9e (patch)
tree003f629e22065e32a07cebd087b3fb1b008b2282 /src/generated
parentc75544f724edabc7bd1bf90e4d2ed7ab8ac04507 (diff)
remove a few duplicate impls, add stubs for geneirc translations
generate_opcode.py has quickly grown into generating much more than just opcode definitions, and now handles a few duplicate impls across the different decode modes as well. some of the added impl generation conflicts with still-existing hand-written impls from yore, so they needed a bit of removing. next will be the addition of a generic module for "probably what you want" disassembly of x86, avoiding the 64-/32-/16-bitness of the architecture family with an attempt to decode "probably what you wanted" from a byte sequence. it needs a little more work still, but TODO stubs added here support that new module.
Diffstat (limited to 'src/generated')
-rw-r--r--src/generated/imp.rs6
-rw-r--r--src/generated/opcode.rs8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/generated/imp.rs b/src/generated/imp.rs
index 86ff91e..123950d 100644
--- a/src/generated/imp.rs
+++ b/src/generated/imp.rs
@@ -1800,7 +1800,7 @@ pub(crate) mod real_mode {
}
}
impl Opcode {
- pub(crate) fn name(&self) -> &'static str {
+ pub fn name(&self) -> &'static str {
self.to_generic().name()
}
}
@@ -4227,7 +4227,7 @@ pub(crate) mod protected_mode {
}
}
impl Opcode {
- pub(crate) fn name(&self) -> &'static str {
+ pub fn name(&self) -> &'static str {
self.to_generic().name()
}
}
@@ -6660,7 +6660,7 @@ pub(crate) mod long_mode {
}
}
impl Opcode {
- pub(crate) fn name(&self) -> &'static str {
+ pub fn name(&self) -> &'static str {
self.to_generic().name()
}
}
diff --git a/src/generated/opcode.rs b/src/generated/opcode.rs
index 5fa5892..0d920cd 100644
--- a/src/generated/opcode.rs
+++ b/src/generated/opcode.rs
@@ -2877,7 +2877,7 @@ pub(crate) const MNEMONICS: &'static [&'static str] = &[
];
impl Opcode {
- pub(crate) fn name(&self) -> &'static str {
+ pub fn name(&self) -> &'static str {
// safety: `MNEMONICS` and `Opcode` are generated together, where every entry in `Opcode` guarantees
// a corresponding entry in `MNEMONICS`.
unsafe {
@@ -4332,7 +4332,7 @@ pub(crate) mod real_mode {
unsafe { core::mem::transmute::<Self, super::Opcode>(*self) }
}
- fn nane(&self) -> &'static str {
+ pub fn nane(&self) -> &'static str {
self.to_generic().name()
}
}
@@ -5784,7 +5784,7 @@ pub(crate) mod protected_mode {
unsafe { core::mem::transmute::<Self, super::Opcode>(*self) }
}
- fn nane(&self) -> &'static str {
+ pub fn nane(&self) -> &'static str {
self.to_generic().name()
}
}
@@ -7226,7 +7226,7 @@ pub(crate) mod long_mode {
unsafe { core::mem::transmute::<Self, super::Opcode>(*self) }
}
- fn nane(&self) -> &'static str {
+ pub fn nane(&self) -> &'static str {
self.to_generic().name()
}
}