Rename PushInt64AsTwoSmis to PushRegisterAsTwoSmis and support x32 as well.
R=verwaest@chromium.org Review URL: https://codereview.chromium.org/232533002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20662 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
8c573aa6cd
commit
8e44a04ea9
@ -124,7 +124,7 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
|
||||
__ Push(reg);
|
||||
}
|
||||
if ((non_object_regs & (1 << r)) != 0) {
|
||||
__ PushInt64AsTwoSmis(reg);
|
||||
__ PushRegisterAsTwoSmis(reg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
|
||||
}
|
||||
// Reconstruct the 64-bit value from two smis.
|
||||
if ((non_object_regs & (1 << r)) != 0) {
|
||||
__ PopInt64AsTwoSmis(reg);
|
||||
__ PopRegisterAsTwoSmis(reg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2283,10 +2283,11 @@ void MacroAssembler::Push(Smi* source) {
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::PushInt64AsTwoSmis(Register src, Register scratch) {
|
||||
void MacroAssembler::PushRegisterAsTwoSmis(Register src, Register scratch) {
|
||||
ASSERT(!src.is(scratch));
|
||||
movp(scratch, src);
|
||||
// High bits.
|
||||
shrp(src, Immediate(64 - kSmiShift));
|
||||
shrp(src, Immediate(kPointerSize * kBitsPerByte - kSmiShift));
|
||||
shlp(src, Immediate(kSmiShift));
|
||||
Push(src);
|
||||
// Low bits.
|
||||
@ -2295,14 +2296,15 @@ void MacroAssembler::PushInt64AsTwoSmis(Register src, Register scratch) {
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::PopInt64AsTwoSmis(Register dst, Register scratch) {
|
||||
void MacroAssembler::PopRegisterAsTwoSmis(Register dst, Register scratch) {
|
||||
ASSERT(!dst.is(scratch));
|
||||
Pop(scratch);
|
||||
// Low bits.
|
||||
shrp(scratch, Immediate(kSmiShift));
|
||||
Pop(dst);
|
||||
shrp(dst, Immediate(kSmiShift));
|
||||
// High bits.
|
||||
shlp(dst, Immediate(64 - kSmiShift));
|
||||
shlp(dst, Immediate(kPointerSize * kBitsPerByte - kSmiShift));
|
||||
orp(dst, scratch);
|
||||
}
|
||||
|
||||
|
@ -726,12 +726,12 @@ class MacroAssembler: public Assembler {
|
||||
|
||||
void Push(Smi* smi);
|
||||
|
||||
// Save away a 64-bit integer on the stack as two 32-bit integers
|
||||
// Save away a raw integer with pointer size on the stack as two integers
|
||||
// masquerading as smis so that the garbage collector skips visiting them.
|
||||
void PushInt64AsTwoSmis(Register src, Register scratch = kScratchRegister);
|
||||
// Reconstruct a 64-bit integer from two 32-bit integers masquerading as
|
||||
// smis on the top of stack.
|
||||
void PopInt64AsTwoSmis(Register dst, Register scratch = kScratchRegister);
|
||||
void PushRegisterAsTwoSmis(Register src, Register scratch = kScratchRegister);
|
||||
// Reconstruct a raw integer with pointer size from two integers masquerading
|
||||
// as smis on the top of stack.
|
||||
void PopRegisterAsTwoSmis(Register dst, Register scratch = kScratchRegister);
|
||||
|
||||
void Test(const Operand& dst, Smi* source);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user