x64: move encodings to a separate module

In order to benchmark the encoding code with criterion, the functions
and structures must be public. Moving this code to its own module
(instead of keeping as a submodule to `inst`), allows `inst` to remain
private. This avoids having to expose and document (or ignore
documenting) the numerous instruction variants in `inst` while allowing
access to the encoding code. This commit changes no functionality.
This commit is contained in:
Andrew Brown
2021-05-10 10:50:56 -07:00
parent 05d57d8ded
commit 02796fc670
7 changed files with 28 additions and 16 deletions

View File

@@ -22,7 +22,6 @@ pub mod args;
mod emit;
#[cfg(test)]
mod emit_tests;
pub(crate) mod encoding;
pub mod regs;
pub mod unwind;
@@ -2856,7 +2855,7 @@ impl EmitState {
self.stack_map = None;
}
fn cur_srcloc(&self) -> SourceLoc {
pub(crate) fn cur_srcloc(&self) -> SourceLoc {
self.cur_srcloc
}
}