ARM64: Fix Register and FPRegister copy constructors.

This issue was introduced in r19156.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/207743003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 33be68c2
...@@ -115,7 +115,7 @@ struct CPURegister { ...@@ -115,7 +115,7 @@ struct CPURegister {
struct Register : public CPURegister { struct Register : public CPURegister {
static Register Create(unsigned code, unsigned size) { static Register Create(unsigned code, unsigned size) {
return CPURegister::Create(code, size, CPURegister::kRegister); return Register(CPURegister::Create(code, size, CPURegister::kRegister));
} }
Register() { Register() {
...@@ -124,7 +124,14 @@ struct Register : public CPURegister { ...@@ -124,7 +124,14 @@ struct Register : public CPURegister {
reg_type = CPURegister::kNoRegister; 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_code = r.reg_code;
reg_size = r.reg_size; reg_size = r.reg_size;
reg_type = r.reg_type; reg_type = r.reg_type;
...@@ -236,7 +243,8 @@ struct Register : public CPURegister { ...@@ -236,7 +243,8 @@ struct Register : public CPURegister {
struct FPRegister : public CPURegister { struct FPRegister : public CPURegister {
static FPRegister Create(unsigned code, unsigned size) { static FPRegister Create(unsigned code, unsigned size) {
return CPURegister::Create(code, size, CPURegister::kFPRegister); return FPRegister(
CPURegister::Create(code, size, CPURegister::kFPRegister));
} }
FPRegister() { FPRegister() {
...@@ -245,7 +253,14 @@ struct FPRegister : public CPURegister { ...@@ -245,7 +253,14 @@ struct FPRegister : public CPURegister {
reg_type = CPURegister::kNoRegister; 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_code = r.reg_code;
reg_size = r.reg_size; reg_size = r.reg_size;
reg_type = r.reg_type; reg_type = r.reg_type;
......
...@@ -2216,7 +2216,7 @@ class UseScratchRegisterScope { ...@@ -2216,7 +2216,7 @@ class UseScratchRegisterScope {
FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); } FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); }
Register UnsafeAcquire(const Register& reg) { Register UnsafeAcquire(const Register& reg) {
return UnsafeAcquire(available_, reg); return Register(UnsafeAcquire(available_, reg));
} }
Register AcquireSameSizeAs(const Register& reg); Register AcquireSameSizeAs(const Register& reg);
......
...@@ -395,7 +395,7 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, ...@@ -395,7 +395,7 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
__ JumpIfSmi(value_reg, miss_label); __ JumpIfSmi(value_reg, miss_label);
} else if (representation.IsDouble()) { } else if (representation.IsDouble()) {
UseScratchRegisterScope temps(masm); UseScratchRegisterScope temps(masm);
Register temp_double = temps.AcquireD(); DoubleRegister temp_double = temps.AcquireD();
__ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
Label do_store, heap_number; Label do_store, heap_number;
...@@ -546,7 +546,7 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm, ...@@ -546,7 +546,7 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
__ JumpIfSmi(value_reg, miss_label); __ JumpIfSmi(value_reg, miss_label);
} else if (representation.IsDouble()) { } else if (representation.IsDouble()) {
UseScratchRegisterScope temps(masm); UseScratchRegisterScope temps(masm);
Register temp_double = temps.AcquireD(); DoubleRegister temp_double = temps.AcquireD();
__ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment