Index: src/arm64/assembler-arm64.h |
diff --git a/src/arm64/assembler-arm64.h b/src/arm64/assembler-arm64.h |
index 79f957b91cb744f8ea4822f3cc87dd8d7086c66c..bc0c84181da2ec4ee6f15c0e34fc8a53211ba396 100644 |
--- a/src/arm64/assembler-arm64.h |
+++ b/src/arm64/assembler-arm64.h |
@@ -115,7 +115,7 @@ struct CPURegister { |
struct Register : public CPURegister { |
static Register Create(unsigned code, unsigned size) { |
- return CPURegister::Create(code, size, CPURegister::kRegister); |
+ return Register(CPURegister::Create(code, size, CPURegister::kRegister)); |
} |
Register() { |
@@ -124,7 +124,14 @@ struct Register : public CPURegister { |
reg_type = CPURegister::kNoRegister; |
} |
- Register(const CPURegister& r) { // NOLINT(runtime/explicit) |
+ explicit Register(const CPURegister& r) { |
+ reg_code = r.reg_code; |
+ reg_size = r.reg_size; |
+ reg_type = r.reg_type; |
+ ASSERT(IsValidOrNone()); |
+ } |
+ |
+ Register(const Register& r) { // NOLINT(runtime/explicit) |
reg_code = r.reg_code; |
reg_size = r.reg_size; |
reg_type = r.reg_type; |
@@ -236,7 +243,8 @@ struct Register : public CPURegister { |
struct FPRegister : public CPURegister { |
static FPRegister Create(unsigned code, unsigned size) { |
- return CPURegister::Create(code, size, CPURegister::kFPRegister); |
+ return FPRegister( |
+ CPURegister::Create(code, size, CPURegister::kFPRegister)); |
} |
FPRegister() { |
@@ -245,7 +253,14 @@ struct FPRegister : public CPURegister { |
reg_type = CPURegister::kNoRegister; |
} |
- FPRegister(const CPURegister& r) { // NOLINT(runtime/explicit) |
+ explicit FPRegister(const CPURegister& r) { |
+ reg_code = r.reg_code; |
+ reg_size = r.reg_size; |
+ reg_type = r.reg_type; |
+ ASSERT(IsValidOrNone()); |
+ } |
+ |
+ FPRegister(const FPRegister& r) { // NOLINT(runtime/explicit) |
reg_code = r.reg_code; |
reg_size = r.reg_size; |
reg_type = r.reg_type; |