Index: runtime/vm/locations.h |
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h |
index b77deacbd637c476854633a0c657b4e5eb7f7bfb..2e8fc9c2a01e968630e7541a685a2295f3db20e0 100644 |
--- a/runtime/vm/locations.h |
+++ b/runtime/vm/locations.h |
@@ -96,12 +96,12 @@ class Location : public ValueObject { |
} |
// Unallocated locations. |
- // TODO(vegorov): writable register policy? |
enum Policy { |
kAny, |
kPrefersRegister, |
kRequiresRegister, |
kRequiresXmmRegister, |
+ kWritableRegister, |
kSameAsFirstInput, |
}; |
@@ -134,6 +134,10 @@ class Location : public ValueObject { |
return UnallocatedLocation(kRequiresXmmRegister); |
} |
+ static Location WritableRegister() { |
+ return UnallocatedLocation(kWritableRegister); |
+ } |
+ |
// The location of the first input to the instruction will be |
// used to replace this unallocated location. |
static Location SameAsFirstInput() { |