aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongjia "toka" Zhang <tokazerkje@outlook.com>2023-12-16 01:55:10 +0900
committeriximeow <me@iximeow.net>2023-12-15 16:34:32 -0800
commit792eb993a87fab799b3a6659c7750f2221608cbf (patch)
tree4bfc685cd06c0dafd53f2158c9423efd92fdb6f0 /src
parent64b2018573592f6a805c42fe06339d5fbb3e15db (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/long_mode/mod.rs6
1 files changed, 3 insertions, 3 deletions
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]