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

Unified Diff: src/IceAssemblerARM32.cpp

Issue 1426513004: Fix ARM emit() methods to count instructions generated. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/IceAssemblerARM32.cpp
diff --git a/src/IceAssemblerARM32.cpp b/src/IceAssemblerARM32.cpp
index 1147f71898eb1a7d87d2546bbee21f83a04be2f4..3f7716fd3a5c1f1b0179ba98934a135183a20881 100644
--- a/src/IceAssemblerARM32.cpp
+++ b/src/IceAssemblerARM32.cpp
@@ -360,11 +360,14 @@ void AssemblerARM32::bind(Label *L) {
}
void AssemblerARM32::emitTextInst(const std::string &Text, SizeT InstSize) {
- AssemblerBuffer::EnsureCapacity ensured(&Buffer);
AssemblerFixup *F = createTextFixup(Text, InstSize);
emitFixup(F);
- for (SizeT I = 0; I < InstSize; ++I)
- Buffer.emit<char>(0);
+ if (InstSize) {
Jim Stichnoth 2015/11/04 23:45:26 Remove this? It's redundant with the loop conditi
Karl 2015/11/05 16:18:40 Done.
+ for (SizeT I = 0; I < InstSize; ++I) {
+ AssemblerBuffer::EnsureCapacity ensured(&Buffer);
+ Buffer.emit<char>(0);
+ }
+ }
}
void AssemblerARM32::emitType01(CondARM32::Cond Cond, IValueT Type,

Powered by Google App Engine
This is Rietveld 408576698