From 7e50574500e4c33d8f12a5cb4893249f29e311f0 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Tue, 28 Feb 2023 22:22:22 +0100 Subject: rename EncodeRI -> EncodeR --- src/lib.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src') 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(&mut self, opc: u8, op1: T, op2: U) where - Self: EncodeRI, + Self: EncodeR, { let opc = opc + (op1.idx() & 0b111); - let prefix = >::legacy_prefix(); - let rex = >::rex(op1); + let prefix = >::legacy_prefix(); + let rex = >::rex(op1); self.emit_optional(&[prefix, rex]); self.emit(&[opc]); @@ -135,7 +135,7 @@ impl Asm { fn encode_ri(&mut self, opc: u8, opc_ext: u8, op1: T, op2: U) where - Self: EncodeRI, + Self: EncodeR, { // MI operand encoding. // op1 -> modrm.rm @@ -146,8 +146,8 @@ impl Asm { op1.idx(), /* rm */ ); - let prefix = >::legacy_prefix(); - let rex = >::rex(op1); + let prefix = >::legacy_prefix(); + let rex = >::rex(op1); self.emit_optional(&[prefix, rex]); self.emit(&[opc, modrm]); @@ -156,7 +156,7 @@ impl Asm { fn encode_r(&mut self, opc: u8, opc_ext: u8, op1: T) where - Self: EncodeRI, + Self: EncodeR, { // M operand encoding. // op1 -> modrm.rm @@ -167,8 +167,8 @@ impl Asm { op1.idx(), /* rm */ ); - let prefix = >::legacy_prefix(); - let rex = >::rex(op1); + let prefix = >::legacy_prefix(); + let rex = >::rex(op1); self.emit_optional(&[prefix, rex]); self.emit(&[opc, modrm]); @@ -257,7 +257,7 @@ impl EncodeRR for Asm { } impl EncodeRR for Asm {} -trait EncodeRI { +trait EncodeR { fn legacy_prefix() -> Option { None } @@ -271,14 +271,14 @@ trait EncodeRI { } } -impl EncodeRI for Asm {} -impl EncodeRI for Asm {} -impl EncodeRI for Asm { +impl EncodeR for Asm {} +impl EncodeR for Asm {} +impl EncodeR for Asm { fn legacy_prefix() -> Option { Some(0x66) } } -impl EncodeRI for Asm {} +impl EncodeR for Asm {} trait EncodeMR { fn legacy_prefix() -> Option { -- cgit v1.2.3