Skip to content

Commit

Permalink
Revert of [x64] Use xorl to materialize smi zero. (patchset #1 id:1 of
Browse files Browse the repository at this point in the history
…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}
  • Loading branch information
bmeurer authored and Commit bot committed Apr 16, 2015
1 parent f89bea1 commit c66a2f7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/x64/macro-assembler-x64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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());
}


Expand Down

0 comments on commit c66a2f7

Please sign in to comment.