diff options
| author | David L Kreitzer <david.l.kreitzer@intel.com> | 2016-05-03 20:16:08 +0000 |
|---|---|---|
| committer | David L Kreitzer <david.l.kreitzer@intel.com> | 2016-05-03 20:16:08 +0000 |
| commit | c9fbf1018a7430f9bb7b0a46b148b93a0dab50ad (patch) | |
| tree | ae081fb9320f4c7ddd48776f4fa75689260268e1 /llvm/lib | |
| parent | 4e05b82cc495a15dac4ce05ad1d2648ba3c739bc (diff) | |
| download | bcm5719-llvm-c9fbf1018a7430f9bb7b0a46b148b93a0dab50ad.tar.gz bcm5719-llvm-c9fbf1018a7430f9bb7b0a46b148b93a0dab50ad.zip | |
Add an address space for the X86 SS segment.
Patch by Michael LeMay (michael.lemay@intel.com)
Differential Revision: http://reviews.llvm.org/D17093
llvm-svn: 268431
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index 54c47011265..4fa7a0fccc0 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -727,6 +727,8 @@ bool X86DAGToDAGISel::matchLoadInAddress(LoadSDNode *N, X86ISelAddressMode &AM){ case 257: AM.Segment = CurDAG->getRegister(X86::FS, MVT::i16); return false; + // Address space 258 is not handled here, because it is not used to + // address TLS areas. } return true; @@ -1424,11 +1426,13 @@ bool X86DAGToDAGISel::selectVectorAddr(SDNode *Parent, SDValue N, SDValue &Base, return false; X86ISelAddressMode AM; unsigned AddrSpace = Mgs->getPointerInfo().getAddrSpace(); - // AddrSpace 256 -> GS, 257 -> FS. + // AddrSpace 256 -> GS, 257 -> FS, 258 -> SS. if (AddrSpace == 256) AM.Segment = CurDAG->getRegister(X86::GS, MVT::i16); if (AddrSpace == 257) AM.Segment = CurDAG->getRegister(X86::FS, MVT::i16); + if (AddrSpace == 258) + AM.Segment = CurDAG->getRegister(X86::SS, MVT::i16); SDLoc DL(N); Base = Mgs->getBasePtr(); @@ -1473,11 +1477,13 @@ bool X86DAGToDAGISel::selectAddr(SDNode *Parent, SDValue N, SDValue &Base, Parent->getOpcode() != X86ISD::EH_SJLJ_LONGJMP) { // longjmp unsigned AddrSpace = cast<MemSDNode>(Parent)->getPointerInfo().getAddrSpace(); - // AddrSpace 256 -> GS, 257 -> FS. + // AddrSpace 256 -> GS, 257 -> FS, 258 -> SS. if (AddrSpace == 256) AM.Segment = CurDAG->getRegister(X86::GS, MVT::i16); if (AddrSpace == 257) AM.Segment = CurDAG->getRegister(X86::FS, MVT::i16); + if (AddrSpace == 258) + AM.Segment = CurDAG->getRegister(X86::SS, MVT::i16); } if (matchAddress(N, AM)) |

