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

Side by Side Diff: src/IceAssemblerARM32.h

Issue 1773503003: Subzero: Control memory growth from local label fixups. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Attempt to fix -nonsfi -filetype=iasm -target=arm32 Created 4 years, 9 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 | « pydir/crosstest_generator.py ('k') | src/IceAssemblerARM32.cpp » ('j') | 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/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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 !Func->getContext()->getFlags().getDisableHybridAssembly()) { 153 !Func->getContext()->getFlags().getDisableHybridAssembly()) {
154 constexpr SizeT InstSize = 0; 154 constexpr SizeT InstSize = 0;
155 emitTextInst(InstL->getName(Func) + ":", InstSize); 155 emitTextInst(InstL->getName(Func) + ":", InstSize);
156 } 156 }
157 Label *L = getOrCreateLocalLabel(Number); 157 Label *L = getOrCreateLocalLabel(Number);
158 if (!getPreliminary()) 158 if (!getPreliminary())
159 this->bind(L); 159 this->bind(L);
160 } 160 }
161 161
162 bool fixupIsPCRel(FixupKind Kind) const override { 162 bool fixupIsPCRel(FixupKind Kind) const override {
163 (void)Kind; 163 if (Kind == llvm::ELF::R_ARM_MOVW_PREL_NC)
164 // TODO(kschimpf) Decide if we need this. 164 return true;
165 if (Kind == llvm::ELF::R_ARM_MOVT_PREL)
166 return true;
165 return false; 167 return false;
166 } 168 }
167 169
168 /// Accessors to keep track of the number of bytes generated inside 170 /// Accessors to keep track of the number of bytes generated inside
169 /// InstARM32::emit() methods, when run inside of 171 /// InstARM32::emit() methods, when run inside of
170 /// InstARM32::emitUsingTextFixup(). 172 /// InstARM32::emitUsingTextFixup().
171 void resetEmitTextSize() { EmitTextSize = 0; } 173 void resetEmitTextSize() { EmitTextSize = 0; }
172 void incEmitTextSize(size_t Amount) { EmitTextSize += Amount; } 174 void incEmitTextSize(size_t Amount) { EmitTextSize += Amount; }
173 void decEmitTextSize(size_t Amount) { EmitTextSize -= Amount; } 175 void decEmitTextSize(size_t Amount) { EmitTextSize -= Amount; }
174 size_t getEmitTextSize() const { return EmitTextSize; } 176 size_t getEmitTextSize() const { return EmitTextSize; }
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 760
759 void emitVFPsss(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpSd, 761 void emitVFPsss(CondARM32::Cond Cond, IValueT Opcode, const Operand *OpSd,
760 const Operand *OpSn, const Operand *OpSm, 762 const Operand *OpSn, const Operand *OpSm,
761 const char *InstName); 763 const char *InstName);
762 }; 764 };
763 765
764 } // end of namespace ARM32 766 } // end of namespace ARM32
765 } // end of namespace Ice 767 } // end of namespace Ice
766 768
767 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H 769 #endif // SUBZERO_SRC_ICEASSEMBLERARM32_H
OLDNEW
« no previous file with comments | « pydir/crosstest_generator.py ('k') | src/IceAssemblerARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698