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

Side by Side Diff: src/IceInstX8632.cpp

Issue 951283002: Subzero: Fix a warning (promoted to an error) under NOASSERT=1 build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction implementation ---===// 1 //===- subzero/src/IceInstX8632.cpp - X86-32 instruction implementation ---===//
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 // This file implements the InstX8632 and OperandX8632 classes, 10 // This file implements the InstX8632 and OperandX8632 classes,
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 Asm->jmp(RegX8632::getEncodedGPR(Var->getRegNum())); 473 Asm->jmp(RegX8632::getEncodedGPR(Var->getRegNum()));
474 } else { 474 } else {
475 // The jmp instruction with a memory operand should be possible 475 // The jmp instruction with a memory operand should be possible
476 // to encode, but it isn't a valid sandboxed instruction, and 476 // to encode, but it isn't a valid sandboxed instruction, and
477 // there shouldn't be a register allocation issue to jump 477 // there shouldn't be a register allocation issue to jump
478 // through a scratch register, so we don't really need to bother 478 // through a scratch register, so we don't really need to bother
479 // implementing it. 479 // implementing it.
480 llvm::report_fatal_error("Assembler can't jmp to memory operand"); 480 llvm::report_fatal_error("Assembler can't jmp to memory operand");
481 } 481 }
482 } else if (const auto Mem = llvm::dyn_cast<OperandX8632Mem>(Target)) { 482 } else if (const auto Mem = llvm::dyn_cast<OperandX8632Mem>(Target)) {
483 (void)Mem;
483 assert(Mem->getSegmentRegister() == OperandX8632Mem::DefaultSegment); 484 assert(Mem->getSegmentRegister() == OperandX8632Mem::DefaultSegment);
484 llvm::report_fatal_error("Assembler can't jmp to memory operand"); 485 llvm::report_fatal_error("Assembler can't jmp to memory operand");
485 } else if (const auto CR = llvm::dyn_cast<ConstantRelocatable>(Target)) { 486 } else if (const auto CR = llvm::dyn_cast<ConstantRelocatable>(Target)) {
486 assert(CR->getOffset() == 0 && "We only support jumping to a function"); 487 assert(CR->getOffset() == 0 && "We only support jumping to a function");
487 Asm->jmp(CR); 488 Asm->jmp(CR);
488 } else if (const auto Imm = llvm::dyn_cast<ConstantInteger32>(Target)) { 489 } else if (const auto Imm = llvm::dyn_cast<ConstantInteger32>(Target)) {
489 // NaCl trampoline calls refer to an address within the sandbox directly. 490 // NaCl trampoline calls refer to an address within the sandbox directly.
490 // This is usually only needed for non-IRT builds and otherwise not 491 // This is usually only needed for non-IRT builds and otherwise not
491 // very portable or stable. For this, we would use the 0xE8 opcode 492 // very portable or stable. For this, we would use the 0xE8 opcode
492 // (relative version of call) and there should be a PC32 reloc too. 493 // (relative version of call) and there should be a PC32 reloc too.
(...skipping 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 } 2946 }
2946 Str << "("; 2947 Str << "(";
2947 if (Func) 2948 if (Func)
2948 Var->dump(Func); 2949 Var->dump(Func);
2949 else 2950 else
2950 Var->dump(Str); 2951 Var->dump(Str);
2951 Str << ")"; 2952 Str << ")";
2952 } 2953 }
2953 2954
2954 } // end of namespace Ice 2955 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698