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

Side by Side Diff: src/IceAssemblerARM32.h

Issue 1511653002: Fix problems with sandboxing and the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up small issues raised in last patch. Created 5 years 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/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===// 1 //===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===//
2 // 2 //
3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 // for details. All rights reserved. Use of this source code is governed by a 4 // for details. All rights reserved. Use of this source code is governed by a
5 // BSD-style license that can be found in the LICENSE file. 5 // BSD-style license that can be found in the LICENSE file.
6 // 6 //
7 // Modified by the Subzero authors. 7 // Modified by the Subzero authors.
8 // 8 //
9 //===----------------------------------------------------------------------===// 9 //===----------------------------------------------------------------------===//
10 // 10 //
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 const char *getAlignDirective() const override { return ".p2alignl"; } 129 const char *getAlignDirective() const override { return ".p2alignl"; }
130 130
131 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override { 131 llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override {
132 // Use a particular UDF encoding -- TRAPNaCl in LLVM: 0xE7FEDEF0 132 // Use a particular UDF encoding -- TRAPNaCl in LLVM: 0xE7FEDEF0
133 // http://llvm.org/viewvc/llvm-project?view=revision&revision=173943 133 // http://llvm.org/viewvc/llvm-project?view=revision&revision=173943
134 static const uint8_t Padding[] = {0xE7, 0xFE, 0xDE, 0xF0}; 134 static const uint8_t Padding[] = {0xE7, 0xFE, 0xDE, 0xF0};
135 return llvm::ArrayRef<uint8_t>(Padding, 4); 135 return llvm::ArrayRef<uint8_t>(Padding, 4);
136 } 136 }
137 137
138 void padWithNop(intptr_t Padding) override { 138 void padWithNop(intptr_t Padding) override;
139 (void)Padding;
140 llvm_unreachable("Not yet implemented.");
141 }
142 139
143 Ice::Label *getCfgNodeLabel(SizeT NodeNumber) override { 140 Ice::Label *getCfgNodeLabel(SizeT NodeNumber) override {
144 assert(NodeNumber < CfgNodeLabels.size()); 141 assert(NodeNumber < CfgNodeLabels.size());
145 return CfgNodeLabels[NodeNumber]; 142 return CfgNodeLabels[NodeNumber];
146 } 143 }
147 144
148 Label *getOrCreateCfgNodeLabel(SizeT NodeNumber) { 145 Label *getOrCreateCfgNodeLabel(SizeT NodeNumber) {
149 return getOrCreateLabel(NodeNumber, CfgNodeLabels); 146 return getOrCreateLabel(NodeNumber, CfgNodeLabels);
150 } 147 }
151 148
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 void movt(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond); 232 void movt(const Operand *OpRd, const Operand *OpSrc, CondARM32::Cond Cond);
236 233
237 void mla(const Operand *OpRd, const Operand *OpRn, const Operand *OpRm, 234 void mla(const Operand *OpRd, const Operand *OpRn, const Operand *OpRm,
238 const Operand *OpRa, CondARM32::Cond Cond); 235 const Operand *OpRa, CondARM32::Cond Cond);
239 236
240 void mul(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, 237 void mul(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1,
241 bool SetFlags, CondARM32::Cond Cond); 238 bool SetFlags, CondARM32::Cond Cond);
242 239
243 void mvn(const Operand *OpRd, const Operand *OpScc, CondARM32::Cond Cond); 240 void mvn(const Operand *OpRd, const Operand *OpScc, CondARM32::Cond Cond);
244 241
242 void nop();
243
245 void orr(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1, 244 void orr(const Operand *OpRd, const Operand *OpRn, const Operand *OpSrc1,
246 bool SetFlags, CondARM32::Cond Cond); 245 bool SetFlags, CondARM32::Cond Cond);
247 246
248 void pop(const Operand *OpRt, CondARM32::Cond Cond); 247 void pop(const Operand *OpRt, CondARM32::Cond Cond);
249 248
250 // Note: Registers is a bitset, where bit n corresponds to register Rn. 249 // Note: Registers is a bitset, where bit n corresponds to register Rn.
251 void popList(const IValueT Registers, CondARM32::Cond Cond); 250 void popList(const IValueT Registers, CondARM32::Cond Cond);
252 251
253 void push(const Operand *OpRt, CondARM32::Cond Cond); 252 void push(const Operand *OpRt, CondARM32::Cond Cond);
254 253
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and 416 // where cccc=Cond, xxxxxxx<<21=Opcode, dddd=Rd, s=SetFlags, and
418 // iiiiiiiiiiiiiiii=Imm16. 417 // iiiiiiiiiiiiiiii=Imm16.
419 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd, 418 void emitMovwt(CondARM32::Cond Cond, bool IsMovw, const Operand *OpRd,
420 const Operand *OpSrc, const char *MovName); 419 const Operand *OpSrc, const char *MovName);
421 }; 420 };
422 421
423 } // end of namespace ARM32 422 } // end of namespace ARM32
424 } // end of namespace Ice 423 } // end of namespace Ice
425 424
426 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H 425 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H
OLDNEW
« src/IceAssembler.cpp ('K') | « src/IceAssembler.cpp ('k') | src/IceAssemblerARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698