Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: src/IceInstX86BaseImpl.h

Issue 1631383002: Subzero. X8664. Fixes various small bugs. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceInstX86BaseImpl.h - Generic X86 instructions -*- C++ -*=// 1 //===- subzero/src/IceInstX86BaseImpl.h - Generic X86 instructions -*- C++ -*=//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
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 /// \file 10 /// \file
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 (void)Mem; 594 (void)Mem;
595 assert(Mem->getSegmentRegister() == X86OperandMem::DefaultSegment); 595 assert(Mem->getSegmentRegister() == X86OperandMem::DefaultSegment);
596 llvm::report_fatal_error("Assembler can't jmp to memory operand"); 596 llvm::report_fatal_error("Assembler can't jmp to memory operand");
597 } else if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Target)) { 597 } else if (const auto *CR = llvm::dyn_cast<ConstantRelocatable>(Target)) {
598 assert(CR->getOffset() == 0 && "We only support jumping to a function"); 598 assert(CR->getOffset() == 0 && "We only support jumping to a function");
599 Asm->jmp(CR); 599 Asm->jmp(CR);
600 } else if (const auto *Imm = llvm::dyn_cast<ConstantInteger32>(Target)) { 600 } else if (const auto *Imm = llvm::dyn_cast<ConstantInteger32>(Target)) {
601 // NaCl trampoline calls refer to an address within the sandbox directly. 601 // NaCl trampoline calls refer to an address within the sandbox directly.
602 // This is usually only needed for non-IRT builds and otherwise not very 602 // This is usually only needed for non-IRT builds and otherwise not very
603 // portable or stable. Usually this is only done for "calls" and not jumps. 603 // portable or stable. Usually this is only done for "calls" and not jumps.
604 // TODO(jvoung): Support this when there is a lowering that actually 604 Asm->jmp(AssemblerImmediate(Imm->getValue()));
605 // triggers this case.
606 (void)Imm;
607 llvm::report_fatal_error("Unexpected jmp to absolute address");
608 } else { 605 } else {
609 llvm::report_fatal_error("Unexpected operand type"); 606 llvm::report_fatal_error("Unexpected operand type");
610 } 607 }
611 } 608 }
612 609
613 template <typename TraitsType> 610 template <typename TraitsType>
614 void InstImpl<TraitsType>::InstX86Jmp::dump(const Cfg *Func) const { 611 void InstImpl<TraitsType>::InstX86Jmp::dump(const Cfg *Func) const {
615 if (!BuildDefs::dump()) 612 if (!BuildDefs::dump())
616 return; 613 return;
617 Ostream &Str = Func->getContext()->getStrDump(); 614 Ostream &Str = Func->getContext()->getStrDump();
(...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 return; 2906 return;
2910 Ostream &Str = Func->getContext()->getStrDump(); 2907 Ostream &Str = Func->getContext()->getStrDump();
2911 Str << "IACA_END"; 2908 Str << "IACA_END";
2912 } 2909 }
2913 2910
2914 } // end of namespace X86NAMESPACE 2911 } // end of namespace X86NAMESPACE
2915 2912
2916 } // end of namespace Ice 2913 } // end of namespace Ice
2917 2914
2918 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H 2915 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698