llvm.org GIT mirror llvm / b70cda8
[X86] Include XMM/YMM/ZMM16-23 in X86II::isX86_64ExtendedReg. This feels more consistent with its name and simplifies assembler code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279922 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
2 changed file(s) with 4 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
903903 if (RegNo == X86::RIZ ||
904904 X86MCRegisterClasses[X86::GR64RegClassID].contains(RegNo) ||
905905 X86II::isX86_64NonExtLowByteReg(RegNo) ||
906 X86II::isX86_64ExtendedReg(RegNo) ||
907 X86II::is32ExtendedReg(RegNo))
906 X86II::isX86_64ExtendedReg(RegNo))
908907 return Error(StartLoc, "register %"
909908 + Tok.getString() + " is only available in 64-bit mode",
910909 SMRange(StartLoc, EndLoc));
729729 /// isX86_64ExtendedReg - Is the MachineOperand a x86-64 extended (r8 or
730730 /// higher) register? e.g. r8, xmm8, xmm13, etc.
731731 inline bool isX86_64ExtendedReg(unsigned RegNo) {
732 if ((RegNo >= X86::XMM8 && RegNo <= X86::XMM15) ||
733 (RegNo >= X86::XMM24 && RegNo <= X86::XMM31) ||
734 (RegNo >= X86::YMM8 && RegNo <= X86::YMM15) ||
735 (RegNo >= X86::YMM24 && RegNo <= X86::YMM31) ||
736 (RegNo >= X86::ZMM8 && RegNo <= X86::ZMM15) ||
737 (RegNo >= X86::ZMM24 && RegNo <= X86::ZMM31))
732 if ((RegNo >= X86::XMM8 && RegNo <= X86::XMM31) ||
733 (RegNo >= X86::YMM8 && RegNo <= X86::YMM31) ||
734 (RegNo >= X86::ZMM8 && RegNo <= X86::ZMM31))
738735 return true;
739736
740737 switch (RegNo) {