summaryrefslogtreecommitdiff
path: root/compiler/utils/label.h
diff options
context:
space:
mode:
author Goran Jakovljevic <Goran.Jakovljevic@imgtec.com> 2015-08-26 14:39:44 +0200
committer Goran Jakovljevic <Goran.Jakovljevic@imgtec.com> 2015-10-06 16:34:25 +0200
commit8c434dcc78d497e18590461700894d1c3e96013d (patch)
tree6fc88cc839c0415aa90a1bbff25e93a09705d19b /compiler/utils/label.h
parent35ef974da353b13938fb0f3272c03070ad728431 (diff)
MIPS: Assemblers changes needed for optimizing compiler
Also add assembler tests for MIPS32. Change-Id: I3ab1fba7f3b06eb3b5058861946d675494a30775
Diffstat (limited to 'compiler/utils/label.h')
-rw-r--r--compiler/utils/label.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/utils/label.h b/compiler/utils/label.h
index ff4a1a4333..1038f44ffe 100644
--- a/compiler/utils/label.h
+++ b/compiler/utils/label.h
@@ -70,6 +70,13 @@ class Label {
public:
Label() : position_(0) {}
+ Label(Label&& src)
+ : position_(src.position_) {
+ // We must unlink/unbind the src label when moving; if not, calling the destructor on
+ // the src label would fail.
+ src.position_ = 0;
+ }
+
~Label() {
// Assert if label is being destroyed with unresolved branches pending.
CHECK(!IsLinked());