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

Unified Diff: src/IceAssembler.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: Lift pass information into linkTo() and nearLinkTo(). 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 side-by-side diff with in-line comments
Download patch
Index: src/IceAssembler.h
diff --git a/src/IceAssembler.h b/src/IceAssembler.h
index d80e3d26e9b4f4f1b8d2a09e06e4539efb7993b7..0febc624b52384cc4234a5021754a1b6bbd8ebda 100644
--- a/src/IceAssembler.h
+++ b/src/IceAssembler.h
@@ -32,6 +32,8 @@
namespace Ice {
+class Assembler;
+
/// A Label can be in one of three states:
/// - Unused.
/// - Linked, unplaced and tracking the position of branches to the label.
@@ -82,11 +84,7 @@ public:
assert(isBound());
}
- void linkTo(intptr_t position) {
- assert(!isBound());
- Position = position + kWordSize;
- assert(isLinked());
- }
+ inline void linkTo(const Assembler &Asm, intptr_t position);
Jim Stichnoth 2015/12/08 22:20:00 Does the "inline" really help here? Also, we may
Karl 2015/12/08 22:39:32 The "inline" is needed if we don't want the functi
Jim Stichnoth 2015/12/08 23:06:44 No - "const Assembler *Asm" means that the pointed
protected:
intptr_t Position = 0;
@@ -354,6 +352,14 @@ protected:
AssemblerBuffer Buffer;
};
+void Label::linkTo(const Assembler &Asm, intptr_t position) {
Jim Stichnoth 2015/12/08 22:20:00 I think this should be moved into the .cpp file.
Karl 2015/12/08 22:39:32 Done.
+ if (Asm.getPreliminary() || Asm.needsTextFixup())
Jim Stichnoth 2015/12/08 22:20:00 I think it's important to leave some documentation
Karl 2015/12/08 22:39:32 Done.
+ return;
+ assert(!isBound());
+ Position = position + kWordSize;
+ assert(isLinked());
+}
+
} // end of namespace Ice
#endif // SUBZERO_SRC_ICEASSEMBLER_H_

Powered by Google App Engine
This is Rietveld 408576698