| OLD | NEW |
| 1 //=== X86MCNaCl.cpp - Expansion of NaCl pseudo-instructions --*- C++ -*-=// | 1 //=== X86MCNaCl.cpp - Expansion of NaCl pseudo-instructions --*- C++ -*-=// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 //===----------------------------------------------------------------------===// | 10 //===----------------------------------------------------------------------===// |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // See the notes below where these functions are defined. | 50 // See the notes below where these functions are defined. |
| 51 namespace { | 51 namespace { |
| 52 unsigned getX86SubSuperRegister_(unsigned Reg, EVT VT, bool High=false); | 52 unsigned getX86SubSuperRegister_(unsigned Reg, EVT VT, bool High=false); |
| 53 unsigned DemoteRegTo32_(unsigned RegIn); | 53 unsigned DemoteRegTo32_(unsigned RegIn); |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 static MCSymbol *CreateTempLabel(MCContext &Context, const char *Prefix) { | 56 static MCSymbol *CreateTempLabel(MCContext &Context, const char *Prefix) { |
| 57 SmallString<128> NameSV; | 57 SmallString<128> NameSV; |
| 58 raw_svector_ostream(NameSV) | 58 raw_svector_ostream(NameSV) |
| 59 << Context.getAsmInfo().getPrivateGlobalPrefix() // get internal label | 59 << Context.getAsmInfo()->getPrivateGlobalPrefix() // get internal label |
| 60 << Prefix << Context.getUniqueSymbolID(); | 60 << Prefix << Context.getUniqueSymbolID(); |
| 61 return Context.GetOrCreateSymbol(NameSV); | 61 return Context.GetOrCreateSymbol(NameSV); |
| 62 } | 62 } |
| 63 | 63 |
| 64 static void EmitDirectCall(const MCOperand &Op, bool Is64Bit, | 64 static void EmitDirectCall(const MCOperand &Op, bool Is64Bit, |
| 65 MCStreamer &Out) { | 65 MCStreamer &Out) { |
| 66 const bool HideSandboxBase = (FlagHideSandboxBase && | 66 const bool HideSandboxBase = (FlagHideSandboxBase && |
| 67 Is64Bit && !FlagUseZeroBasedSandbox); | 67 Is64Bit && !FlagUseZeroBasedSandbox); |
| 68 if (HideSandboxBase) { | 68 if (HideSandboxBase) { |
| 69 // For NaCl64, the sequence | 69 // For NaCl64, the sequence |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 | 818 |
| 819 unsigned DemoteRegTo32_(unsigned RegIn) { | 819 unsigned DemoteRegTo32_(unsigned RegIn) { |
| 820 if (RegIn == 0) | 820 if (RegIn == 0) |
| 821 return 0; | 821 return 0; |
| 822 unsigned RegOut = getX86SubSuperRegister_(RegIn, MVT::i32, false); | 822 unsigned RegOut = getX86SubSuperRegister_(RegIn, MVT::i32, false); |
| 823 assert(RegOut != 0); | 823 assert(RegOut != 0); |
| 824 return RegOut; | 824 return RegOut; |
| 825 } | 825 } |
| 826 } //namespace | 826 } //namespace |
| 827 // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | 827 // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
| OLD | NEW |