From 550d58d6f4f1fc6c7cf7abeb2a02997b1a931747 Mon Sep 17 00:00:00 2001 From: Shadow Cat Date: Fri, 12 Jun 2026 22:57:01 -0400 Subject: [PATCH] more rex stuff --- src/arch/x86_64/encode.rs | 2 +- src/arch/x86_64/reg.rs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/arch/x86_64/encode.rs b/src/arch/x86_64/encode.rs index 96a57e8..ccf2678 100644 --- a/src/arch/x86_64/encode.rs +++ b/src/arch/x86_64/encode.rs @@ -100,7 +100,7 @@ impl Code { } self.prefix32(&dst)?; self.prefix16(encode_width); - if dst.reg.requires_mem_rex() || dst.width == Width::B64 { + if dst.reg.gt8() || dst.width == Width::B64 { self.bytes.push(rex(dst, 0, 0, dst)); } self.bytes.push(0xc6 | encode_width.not8()); diff --git a/src/arch/x86_64/reg.rs b/src/arch/x86_64/reg.rs index 2284fa5..1f4d306 100644 --- a/src/arch/x86_64/reg.rs +++ b/src/arch/x86_64/reg.rs @@ -72,10 +72,6 @@ impl Reg { || (self.gt4() && self.width == Width::B8 && !self.high) } - pub fn requires_mem_rex(&self) -> bool { - self.gt8() || (self.gt4() && self.width == Width::B8 && !self.high) - } - pub fn incompatible(&self, other: &Reg) -> bool { (self.requires_rex() && other.high) || (self.high && other.requires_rex()) }