aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-02-28 22:22:22 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-02-28 22:22:22 +0100
commit7e50574500e4c33d8f12a5cb4893249f29e311f0 (patch)
tree233cc629dc0c68ceba34ad1c4059f21cb5f3b50b
parent6486b862edc2750dba83848f62d6c9f3d4c6d3c2 (diff)
downloadjuicebox-asm-7e50574500e4c33d8f12a5cb4893249f29e311f0.tar.gz
juicebox-asm-7e50574500e4c33d8f12a5cb4893249f29e311f0.zip
rename EncodeRI -> EncodeR
-rw-r--r--src/lib.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 4a7b73e..892c08f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -122,11 +122,11 @@ impl Asm {
fn encode_oi<T: Reg, U: Imm>(&mut self, opc: u8, op1: T, op2: U)
where
- Self: EncodeRI<T>,
+ Self: EncodeR<T>,
{
let opc = opc + (op1.idx() & 0b111);
- let prefix = <Self as EncodeRI<T>>::legacy_prefix();
- let rex = <Self as EncodeRI<T>>::rex(op1);
+ let prefix = <Self as EncodeR<T>>::legacy_prefix();
+ let rex = <Self as EncodeR<T>>::rex(op1);
self.emit_optional(&[prefix, rex]);
self.emit(&[opc]);
@@ -135,7 +135,7 @@ impl Asm {
fn encode_ri<T: Reg, U: Imm>(&mut self, opc: u8, opc_ext: u8, op1: T, op2: U)
where
- Self: EncodeRI<T>,
+ Self: EncodeR<T>,
{
// MI operand encoding.
// op1 -> modrm.rm
@@ -146,8 +146,8 @@ impl Asm {
op1.idx(), /* rm */
);
- let prefix = <Self as EncodeRI<T>>::legacy_prefix();
- let rex = <Self as EncodeRI<T>>::rex(op1);
+ let prefix = <Self as EncodeR<T>>::legacy_prefix();
+ let rex = <Self as EncodeR<T>>::rex(op1);
self.emit_optional(&[prefix, rex]);
self.emit(&[opc, modrm]);
@@ -156,7 +156,7 @@ impl Asm {
fn encode_r<T: Reg>(&mut self, opc: u8, opc_ext: u8, op1: T)
where
- Self: EncodeRI<T>,
+ Self: EncodeR<T>,
{
// M operand encoding.
// op1 -> modrm.rm
@@ -167,8 +167,8 @@ impl Asm {
op1.idx(), /* rm */
);
- let prefix = <Self as EncodeRI<T>>::legacy_prefix();
- let rex = <Self as EncodeRI<T>>::rex(op1);
+ let prefix = <Self as EncodeR<T>>::legacy_prefix();
+ let rex = <Self as EncodeR<T>>::rex(op1);
self.emit_optional(&[prefix, rex]);
self.emit(&[opc, modrm]);
@@ -257,7 +257,7 @@ impl EncodeRR<Reg16> for Asm {
}
impl EncodeRR<Reg64> for Asm {}
-trait EncodeRI<T: Reg> {
+trait EncodeR<T: Reg> {
fn legacy_prefix() -> Option<u8> {
None
}
@@ -271,14 +271,14 @@ trait EncodeRI<T: Reg> {
}
}
-impl EncodeRI<Reg8> for Asm {}
-impl EncodeRI<Reg32> for Asm {}
-impl EncodeRI<Reg16> for Asm {
+impl EncodeR<Reg8> for Asm {}
+impl EncodeR<Reg32> for Asm {}
+impl EncodeR<Reg16> for Asm {
fn legacy_prefix() -> Option<u8> {
Some(0x66)
}
}
-impl EncodeRI<Reg64> for Asm {}
+impl EncodeR<Reg64> for Asm {}
trait EncodeMR<T: Reg> {
fn legacy_prefix() -> Option<u8> {