Lines Matching refs:X86
1 //===-- X86RegisterInfo.cpp - X86 Register Information --------------------===//
10 // This file contains the X86 implementation of the TargetRegisterInfo class.
12 // on X86.
53 EnableBasePointer("x86-use-base-pointer", cl::Hidden, cl::init(true),
58 (STI.is64Bit() ? X86::RIP : X86::EIP),
61 (STI.is64Bit() ? X86::RIP : X86::EIP)),
71 StackPtr = X86::RSP;
72 FramePtr = X86::RBP;
75 StackPtr = X86::ESP;
76 FramePtr = X86::EBP;
81 BasePtr = Is64Bit ? X86::RBX : X86::ESI;
100 if (!Is64Bit && Idx == X86::sub_8bit)
101 Idx = X86::sub_8bit_hi;
112 if (!Is64Bit && SubIdx == X86::sub_8bit) {
113 A = X86GenRegisterInfo::getSubClassWithSubReg(A, X86::sub_8bit_hi);
130 if (RC == &X86::GR8_NOREXRegClass)
137 case X86::GR8RegClassID:
138 case X86::GR16RegClassID:
139 case X86::GR32RegClassID:
140 case X86::GR64RegClassID:
141 case X86::FR32RegClassID:
142 case X86::FR64RegClassID:
143 case X86::RFP32RegClassID:
144 case X86::RFP64RegClassID:
145 case X86::RFP80RegClassID:
146 case X86::VR128RegClassID:
147 case X86::VR256RegClassID:
165 return &X86::GR64RegClass;
166 return &X86::GR32RegClass;
169 return &X86::GR64_NOSPRegClass;
170 return &X86::GR32_NOSPRegClass;
173 return &X86::GR64_TCW64RegClass;
175 return &X86::GR64_TCRegClass;
180 return &X86::GR32RegClass;
181 return &X86::GR32_TCRegClass;
187 if (RC == &X86::CCRRegClass) {
189 return &X86::GR64RegClass;
191 return &X86::GR32RegClass;
205 case X86::GR32RegClassID:
207 case X86::GR64RegClassID:
209 case X86::VR128RegClassID:
211 case X86::VR64RegClassID:
330 for (MCSubRegIterator I(X86::RSP, this, /*IncludeSelf=*/true); I.isValid();
335 for (MCSubRegIterator I(X86::RIP, this, /*IncludeSelf=*/true); I.isValid();
341 for (MCSubRegIterator I(X86::RBP, this, /*IncludeSelf=*/true); I.isValid();
361 Reserved.set(X86::CS);
362 Reserved.set(X86::SS);
363 Reserved.set(X86::DS);
364 Reserved.set(X86::ES);
365 Reserved.set(X86::FS);
366 Reserved.set(X86::GS);
370 Reserved.set(X86::ST0 + n);
374 // These 8-bit registers are part of the x86-64 extension even though their
376 Reserved.set(X86::SIL);
377 Reserved.set(X86::DIL);
378 Reserved.set(X86::BPL);
379 Reserved.set(X86::SPL);
383 for (MCRegAliasIterator AI(X86::R8 + n, this, true); AI.isValid(); ++AI)
387 for (MCRegAliasIterator AI(X86::XMM8 + n, this, true); AI.isValid(); ++AI)
393 for (MCRegAliasIterator AI(X86::XMM0 + n, this, true); AI.isValid(); ++AI)
481 bool AfterFPPop = Opc == X86::TAILJMPm64 || Opc == X86::TAILJMPm;
505 // X86 format. It only has a FI and an offset.
542 case X86::SIL: case X86::SI: case X86::ESI: case X86::RSI:
543 return X86::SI;
544 case X86::DIL: case X86::DI: case X86::EDI: case X86::RDI:
545 return X86::DI;
546 case X86::BPL: case X86::BP: case X86::EBP: case X86::RBP:
547 return X86::BP;
548 case X86::SPL: case X86::SP: case X86::ESP: case X86::RSP:
549 return X86::SP;
550 case X86::AH: case X86::AL: case X86::AX: case X86::EAX: case X86::RAX:
551 return X86::AH;
552 case X86::DH: case X86::DL: case X86::DX: case X86::EDX: case X86::RDX:
553 return X86::DH;
554 case X86::CH: case X86::CL: case X86::CX: case X86::ECX: case X86::RCX:
555 return X86::CH;
556 case X86::BH: case X86::BL: case X86::BX: case X86::EBX: case X86::RBX:
557 return X86::BH;
562 case X86::AH: case X86::AL: case X86::AX: case X86::EAX: case X86::RAX:
563 return X86::AL;
564 case X86::DH: case X86::DL: case X86::DX: case X86::EDX: case X86::RDX:
565 return X86::DL;
566 case X86::CH: case X86::CL: case X86::CX: case X86::ECX: case X86::RCX:
567 return X86::CL;
568 case X86::BH: case X86::BL: case X86::BX: case X86::EBX: case X86::RBX:
569 return X86::BL;
570 case X86::SIL: case X86::SI: case X86::ESI: case X86::RSI:
571 return X86::SIL;
572 case X86::DIL: case X86::DI: case X86::EDI: case X86::RDI:
573 return X86::DIL;
574 case X86::BPL: case X86::BP: case X86::EBP: case X86::RBP:
575 return X86::BPL;
576 case X86::SPL: case X86::SP: case X86::ESP: case X86::RSP:
577 return X86::SPL;
578 case X86::R8B: case X86::R8W: case X86::R8D: case X86::R8:
579 return X86::R8B;
580 case X86::R9B: case X86::R9W: case X86::R9D: case X86::R9:
581 return X86::R9B;
582 case X86::R10B: case X86::R10W: case X86::R10D: case X86::R10:
583 return X86::R10B;
584 case X86::R11B: case X86::R11W: case X86::R11D: case X86::R11:
585 return X86::R11B;
586 case X86::R12B: case X86::R12W: case X86::R12D: case X86::R12:
587 return X86::R12B;
588 case X86::R13B: case X86::R13W: case X86::R13D: case X86::R13:
589 return X86::R13B;
590 case X86::R14B: case X86::R14W: case X86::R14D: case X86::R14:
591 return X86::R14B;
592 case X86::R15B: case X86::R15W: case X86::R15D: case X86::R15:
593 return X86::R15B;
599 case X86::AH: case X86::AL: case X86::AX: case X86::EAX: case X86::RAX:
600 return X86::AX;
601 case X86::DH: case X86::DL: case X86::DX: case X86::EDX: case X86::RDX:
602 return X86::DX;
603 case X86::CH: case X86::CL: case X86::CX: case X86::ECX: case X86::RCX:
604 return X86::CX;
605 case X86::BH: case X86::BL: case X86::BX: case X86::EBX: case X86::RBX:
606 return X86::BX;
607 case X86::SIL: case X86::SI: case X86::ESI: case X86::RSI:
608 return X86::SI;
609 case X86::DIL: case X86::DI: case X86::EDI: case X86::RDI:
610 return X86::DI;
611 case X86::BPL: case X86::BP: case X86::EBP: case X86::RBP:
612 return X86::BP;
613 case X86::SPL: case X86::SP: case X86::ESP: case X86::RSP:
614 return X86::SP;
615 case X86::R8B: case X86::R8W: case X86::R8D: case X86::R8:
616 return X86::R8W;
617 case X86::R9B: case X86::R9W: case X86::R9D: case X86::R9:
618 return X86::R9W;
619 case X86::R10B: case X86::R10W: case X86::R10D: case X86::R10:
620 return X86::R10W;
621 case X86::R11B: case X86::R11W: case X86::R11D: case X86::R11:
622 return X86::R11W;
623 case X86::R12B: case X86::R12W: case X86::R12D: case X86::R12:
624 return X86::R12W;
625 case X86::R13B: case X86::R13W: case X86::R13D: case X86::R13:
626 return X86::R13W;
627 case X86::R14B: case X86::R14W: case X86::R14D: case X86::R14:
628 return X86::R14W;
629 case X86::R15B: case X86::R15W: case X86::R15D: case X86::R15:
630 return X86::R15W;
635 case X86::AH: case X86::AL: case X86::AX: case X86::EAX: case X86::RAX:
636 return X86::EAX;
637 case X86::DH: case X86::DL: case X86::DX: case X86::EDX: case X86::RDX:
638 return X86::EDX;
639 case X86::CH: case X86::CL: case X86::CX: case X86::ECX: case X86::RCX:
640 return X86::ECX;
641 case X86::BH: case X86::BL: case X86::BX: case X86::EBX: case X86::RBX:
642 return X86::EBX;
643 case X86::SIL: case X86::SI: case X86::ESI: case X86::RSI:
644 return X86::ESI;
645 case X86::DIL: case X86::DI: case X86::EDI: case X86::RDI:
646 return X86::EDI;
647 case X86::BPL: case X86::BP: case X86::EBP: case X86::RBP:
648 return X86::EBP;
649 case X86::SPL: case X86::SP: case X86::ESP: case X86::RSP:
650 return X86::ESP;
651 case X86::R8B: case X86::R8W: case X86::R8D: case X86::R8:
652 return X86::R8D;
653 case X86::R9B: case X86::R9W: case X86::R9D: case X86::R9:
654 return X86::R9D;
655 case X86::R10B: case X86::R10W: case X86::R10D: case X86::R10:
656 return X86::R10D;
657 case X86::R11B: case X86::R11W: case X86::R11D: case X86::R11:
658 return X86::R11D;
659 case X86::R12B: case X86::R12W: case X86::R12D: case X86::R12:
660 return X86::R12D;
661 case X86::R13B: case X86::R13W: case X86::R13D: case X86::R13:
662 return X86::R13D;
663 case X86::R14B: case X86::R14W: case X86::R14D: case X86::R14:
664 return X86::R14D;
665 case X86::R15B: case X86::R15W: case X86::R15D: case X86::R15:
666 return X86::R15D;
671 case X86::AH: case X86::AL: case X86::AX: case X86::EAX: case X86::RAX:
672 return X86::RAX;
673 case X86::DH: case X86::DL: case X86::DX: case X86::EDX: case X86::RDX:
674 return X86::RDX;
675 case X86::CH: case X86::CL: case X86::CX: case X86::ECX: case X86::RCX:
676 return X86::RCX;
677 case X86::BH: case X86::BL: case X86::BX: case X86::EBX: case X86::RBX:
678 return X86::RBX;
679 case X86::SIL: case X86::SI: case X86::ESI: case X86::RSI:
680 return X86::RSI;
681 case X86::DIL: case X86::DI: case X86::EDI: case X86::RDI:
682 return X86::RDI;
683 case X86::BPL: case X86::BP: case X86::EBP: case X86::RBP:
684 return X86::RBP;
685 case X86::SPL: case X86::SP: case X86::ESP: case X86::RSP:
686 return X86::RSP;
687 case X86::R8B: case X86::R8W: case X86::R8D: case X86::R8:
688 return X86::R8;
689 case X86::R9B: case X86::R9W: case X86::R9D: case X86::R9:
690 return X86::R9;
691 case X86::R10B: case X86::R10W: case X86::R10D: case X86::R10:
692 return X86::R10;
693 case X86::R11B: case X86::R11W: case X86::R11D: case X86::R11:
694 return X86::R11;
695 case X86::R12B: case X86::R12W: case X86::R12D: case X86::R12:
696 return X86::R12;
697 case X86::R13B: case X86::R13W: case X86::R13D: case X86::R13:
698 return X86::R13;
699 case X86::R14B: case X86::R14W: case X86::R14D: case X86::R14:
700 return X86::R14;
701 case X86::R15B: case X86::R15W: case X86::R15D: case X86::R15:
702 return X86::R15;
708 if (Reg >= X86::XMM0 && Reg <= X86::XMM31)
709 return X86::ZMM0 + (Reg - X86::XMM0);
710 if (Reg >= X86::YMM0 && Reg <= X86::YMM31)
711 return X86::ZMM0 + (Reg - X86::YMM0);
712 if (Reg >= X86::ZMM0 && Reg <= X86::ZMM31)