From 136d397a52256a2fb7a9aaa4e1aa981962ea13d6 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Wed, 26 Mar 2014 17:46:46 +0100 Subject: [PATCH] core/sal: identical register IDs for 32 and 64 bit With this change, x86 special-purpose registers (e.g., EFLAGS) get the same register ID in both 32 bit and 64 bit configurations. Change-Id: I69db9397481414f99ca05ecb0ea9dc8ab7d989c9 --- src/core/sal/x86/X86Architecture.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/sal/x86/X86Architecture.hpp b/src/core/sal/x86/X86Architecture.hpp index 5d74db6b..45655697 100644 --- a/src/core/sal/x86/X86Architecture.hpp +++ b/src/core/sal/x86/X86Architecture.hpp @@ -34,6 +34,9 @@ enum GPRegisterId { RID_R8, RID_R9, RID_R10, RID_R11, RID_R12, RID_R13, RID_R14, RID_R15, #else // 32 bit register id's: RID_EAX = 0, RID_ECX, RID_EDX, RID_EBX, RID_ESP, RID_EBP, RID_ESI, RID_EDI, + // skip a few IDs to get identical numbers for special-purpose registers in + // 32 and 64 bit setups: + SKIP_64BIT_IDS = 15, #endif RID_LAST_GP_ID, // common register id's (independent of the current register width):