From d2b4f3d1a454c7bbcc487ddfb2839b01dc1c9c9e Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 27 Aug 2022 17:08:29 -0700 Subject: 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. --- data/generate_opcode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data') diff --git a/data/generate_opcode.py b/data/generate_opcode.py index 27eea11..491798d 100644 --- a/data/generate_opcode.py +++ b/data/generate_opcode.py @@ -231,7 +231,7 @@ f.writeline("];") f.newline() f.begin_block("impl Opcode") -f.begin_block("pub(crate) fn name(&self) -> &'static str") +f.begin_block("pub fn name(&self) -> &'static str") f.comment("safety: `MNEMONICS` and `Opcode` are generated together, where every entry in `Opcode` guarantees") f.comment(" a corresponding entry in `MNEMONICS`.") f.begin_block("unsafe") @@ -269,7 +269,7 @@ for root in ROOTS: f.newline() - f.begin_block("fn nane(&self) -> &'static str") + f.begin_block("pub fn nane(&self) -> &'static str") f.writeline("self.to_generic().name()") f.end_block() @@ -373,7 +373,7 @@ for root in ROOTS: f.end_block() f.begin_block("impl Opcode") - f.begin_block("pub(crate) fn name(&self) -> &'static str") + f.begin_block("pub fn name(&self) -> &'static str") f.writeline("self.to_generic().name()") f.end_block() f.end_block() -- cgit v1.1