From 792eb993a87fab799b3a6659c7750f2221608cbf Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Sat, 16 Dec 2023 01:55:10 +0900 Subject: fix incorrect register numbers in r12/r13 RegSpec constructor functions these functions had a copypaste error where the r12 and r13 versions would create RegSpec for registers 8 and 9 instead of 12 and 13. use correct register numbers in these macros. --- src/long_mode/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/long_mode') diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 14f782c..5132973 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -290,14 +290,14 @@ impl RegSpec { eax => 0, ecx => 1, edx => 2, ebx => 3, esp => 4, ebp => 5, esi => 6, edi => 7, r8d => 8, r9d => 9, r10d => 10, r11d => 11, - r12d => 8, r13d => 9, r14d => 14, r15d => 15 + r12d => 12, r13d => 13, r14d => 14, r15d => 15 ); register!(W, ax => 0, cx => 1, dx => 2, bx => 3, sp => 4, bp => 5, si => 6, di => 7, r8w => 8, r9w => 9, r10w => 10, r11w => 11, - r12w => 8, r13w => 9, r14w => 14, r15w => 15 + r12w => 12, r13w => 13, r14w => 14, r15w => 15 ); register!(B, @@ -308,7 +308,7 @@ impl RegSpec { register!(rB, spl => 4, bpl => 5, sil => 6, dil => 7, r8b => 8, r9b => 9, r10b => 10, r11b => 11, - r12b => 8, r13b => 9, r14b => 14, r15b => 15 + r12b => 12, r13b => 13, r14b => 14, r15b => 15 ); #[inline] -- cgit v1.1