diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2017-04-27 16:54:50 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2017-04-27 16:54:50 +0900 |
commit | 5b975f8233e8c8d17b215372f89ca713b45d6a0b (patch) | |
tree | 0267bcc331458a01f4c26fafd28110a72273beb3 /src/jit/emitxarch.cpp | |
parent | a56e30c8d33048216567753d9d3fefc2152af8ac (diff) | |
download | coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.tar.gz coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.tar.bz2 coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.zip |
Imported Upstream version 2.0.0.11599upstream/2.0.0.11599
Diffstat (limited to 'src/jit/emitxarch.cpp')
-rw-r--r-- | src/jit/emitxarch.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp index b495d015d6..760813004c 100644 --- a/src/jit/emitxarch.cpp +++ b/src/jit/emitxarch.cpp @@ -332,16 +332,9 @@ bool IsXMMReg(regNumber reg) unsigned RegEncoding(regNumber reg) { #ifndef LEGACY_BACKEND - // XMM registers do not share the same reg numbers as integer registers. - // But register encoding of integer and XMM registers is the same. - // Therefore, subtract XMMBASE from regNumber to get the register encoding - // in case of XMM registers. - return (unsigned)((IsXMMReg(reg) ? reg - XMMBASE : reg) & 0x7); -#else // LEGACY_BACKEND - // Legacy X86: XMM registers share the same reg numbers as integer registers and - // hence nothing to do to get reg encoding. + static_assert((REG_XMM0 & 0x7) == 0, "bad XMMBASE"); +#endif return (unsigned)(reg & 0x7); -#endif // LEGACY_BACKEND } // Utility routines that abstract the logic of adding REX.W, REX.R, REX.X, REX.B and REX prefixes |