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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1649053002: Add the trap instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 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
OLDNEW
1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// 1 //===- subzero/src/IceInstARM32.cpp - ARM32 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 /// \file 10 /// \file
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 assert(getSrcSize() == 0); 1941 assert(getSrcSize() == 0);
1942 // There isn't a mnemonic for the special NaCl Trap encoding, so dump 1942 // There isn't a mnemonic for the special NaCl Trap encoding, so dump
1943 // the raw bytes. 1943 // the raw bytes.
1944 Str << "\t.long 0x"; 1944 Str << "\t.long 0x";
1945 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 1945 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1946 for (uint8_t I : Asm->getNonExecBundlePadding()) { 1946 for (uint8_t I : Asm->getNonExecBundlePadding()) {
1947 Str.write_hex(I); 1947 Str.write_hex(I);
1948 } 1948 }
1949 } 1949 }
1950 1950
1951 void InstARM32Trap::emitIAS(const Cfg *Func) const {
1952 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1953 Asm->trap();
1954 assert(!Asm->needsTextFixup());
1955 }
1956
1951 void InstARM32Trap::dump(const Cfg *Func) const { 1957 void InstARM32Trap::dump(const Cfg *Func) const {
1952 if (!BuildDefs::dump()) 1958 if (!BuildDefs::dump())
1953 return; 1959 return;
1954 Ostream &Str = Func->getContext()->getStrDump(); 1960 Ostream &Str = Func->getContext()->getStrDump();
1955 Str << "trap"; 1961 Str << "trap";
1956 } 1962 }
1957 1963
1958 void InstARM32Umull::emit(const Cfg *Func) const { 1964 void InstARM32Umull::emit(const Cfg *Func) const {
1959 if (!BuildDefs::dump()) 1965 if (!BuildDefs::dump())
1960 return; 1966 return;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 2456
2451 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2457 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2452 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2458 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2453 2459
2454 template class InstARM32CmpLike<InstARM32::Cmn>; 2460 template class InstARM32CmpLike<InstARM32::Cmn>;
2455 template class InstARM32CmpLike<InstARM32::Cmp>; 2461 template class InstARM32CmpLike<InstARM32::Cmp>;
2456 template class InstARM32CmpLike<InstARM32::Tst>; 2462 template class InstARM32CmpLike<InstARM32::Tst>;
2457 2463
2458 } // end of namespace ARM32 2464 } // end of namespace ARM32
2459 } // end of namespace Ice 2465 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698