aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/asm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm.rs')
-rw-r--r--src/asm.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/asm.rs b/src/asm.rs
index 8ee5fb1..010bb68 100644
--- a/src/asm.rs
+++ b/src/asm.rs
@@ -92,7 +92,7 @@ impl Asm {
// -- Encode utilities.
/// Encode an register-register instruction.
- pub(crate) fn encode_rr<T: Reg>(&mut self, opc: u8, op1: T, op2: T)
+ pub(crate) fn encode_rr<T: Reg>(&mut self, opc: &[u8], op1: T, op2: T)
where
Self: EncodeRR<T>,
{
@@ -109,7 +109,8 @@ impl Asm {
let rex = <Self as EncodeRR<T>>::rex(op1, op2);
self.emit_optional(&[prefix, rex]);
- self.emit(&[opc, modrm]);
+ self.emit(opc);
+ self.emit(&[modrm]);
}
/// Encode an offset-immediate instruction.