Revert of [x64] Use xorl to materialize smi zero. (patchset #1 id:1 of https://codereview.chromium.org/1085153002/)
Reason for revert: Seems to cause performance regressions. Original issue's description: > [x64] Use xorl to materialize smi zero. > > Before we always loaded smi zero via a movabs with a 64-bit immediate, > which is pretty expensive compared to the xorl. > > R=jarin@chromium.org > > Committed: https://crrev.com/f236777bfe6e080ff1ead6baf847cc9b6bb4f9cb > Cr-Commit-Position: refs/heads/master@{#27829} TBR=jarin@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:477592 LOG=n Review URL: https://codereview.chromium.org/1059543004 Cr-Commit-Position: refs/heads/master@{#27867}
This commit is contained in:
parent
f89bea1e17
commit
c66a2f7b46
@ -915,7 +915,6 @@ void MacroAssembler::SafePush(Smi* src) {
|
||||
|
||||
|
||||
Register MacroAssembler::GetSmiConstant(Smi* source) {
|
||||
STATIC_ASSERT(kSmiTag == 0);
|
||||
int value = source->value();
|
||||
if (value == 0) {
|
||||
xorl(kScratchRegister, kScratchRegister);
|
||||
@ -927,13 +926,7 @@ Register MacroAssembler::GetSmiConstant(Smi* source) {
|
||||
|
||||
|
||||
void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) {
|
||||
STATIC_ASSERT(kSmiTag == 0);
|
||||
int value = source->value();
|
||||
if (value == 0) {
|
||||
xorl(dst, dst);
|
||||
} else {
|
||||
Move(dst, source, Assembler::RelocInfoNone());
|
||||
}
|
||||
Move(dst, source, Assembler::RelocInfoNone());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user