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
This commit is contained in:
alexandre.rames@arm.com 2014-03-24 17:41:37 +00:00
parent 33be68c2fa
commit e577a18bd8
3 changed files with 22 additions and 7 deletions

View File

@ -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;

View File

@ -2216,7 +2216,7 @@ class UseScratchRegisterScope {
FPRegister AcquireD() { return AcquireNextAvailable(availablefp_).D(); }
Register UnsafeAcquire(const Register& reg) {
return UnsafeAcquire(available_, reg);
return Register(UnsafeAcquire(available_, reg));
}
Register AcquireSameSizeAs(const Register& reg);

View File

@ -395,7 +395,7 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
__ JumpIfSmi(value_reg, miss_label);
} else if (representation.IsDouble()) {
UseScratchRegisterScope temps(masm);
Register temp_double = temps.AcquireD();
DoubleRegister temp_double = temps.AcquireD();
__ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
Label do_store, heap_number;
@ -546,7 +546,7 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
__ JumpIfSmi(value_reg, miss_label);
} else if (representation.IsDouble()) {
UseScratchRegisterScope temps(masm);
Register temp_double = temps.AcquireD();
DoubleRegister temp_double = temps.AcquireD();
__ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);