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

Unified Diff: src/arm64/assembler-arm64.h

Issue 207743003: ARM64: Fix Register and FPRegister copy constructors. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 9 months 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
« no previous file with comments | « no previous file | src/arm64/stub-cache-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/arm64/stub-cache-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698