Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: src/x64/codegen-x64.cc

Issue 2861011: X64: Fix bug in LoadSSE2NumberOperands. It can be called with two smis! (Closed)
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/codegen-x64.cc
diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
index f5759b276d1c47d7249047a57ffecb0e5a7170f3..3ba890672b5272decf1971927beec7c3d9f7cdec 100644
--- a/src/x64/codegen-x64.cc
+++ b/src/x64/codegen-x64.cc
@@ -9932,13 +9932,6 @@ void FloatingPointHelper::LoadSSE2SmiOperands(MacroAssembler* masm) {
void FloatingPointHelper::LoadSSE2NumberOperands(MacroAssembler* masm) {
- if (FLAG_debug_code) {
- // Both arguments can not be smis. That case is handled by smi-only code.
- Label ok;
- __ JumpIfNotBothSmi(rax, rdx, &ok);
- __ Abort("Both arguments smi but not handled by smi-code.");
- __ bind(&ok);
- }
Label load_smi_rdx, load_nonsmi_rax, load_smi_rax, done;
// Load operand in rdx into xmm0.
__ JumpIfSmi(rdx, &load_smi_rdx);
@@ -9952,7 +9945,7 @@ void FloatingPointHelper::LoadSSE2NumberOperands(MacroAssembler* masm) {
__ bind(&load_smi_rdx);
__ SmiToInteger32(kScratchRegister, rdx);
__ cvtlsi2sd(xmm0, kScratchRegister);
- __ jmp(&load_nonsmi_rax);
+ __ JumpIfNotSmi(rax, &load_nonsmi_rax);
__ bind(&load_smi_rax);
__ SmiToInteger32(kScratchRegister, rax);
@@ -10058,8 +10051,6 @@ void FloatingPointHelper::LoadNumbersAsIntegers(MacroAssembler* masm) {
Label done;
Label rax_is_object;
Label rdx_is_object;
- Label rax_is_smi;
- Label rdx_is_smi;
__ JumpIfNotSmi(rdx, &rdx_is_object);
__ SmiToInteger32(rdx, rdx);
@@ -10071,7 +10062,6 @@ void FloatingPointHelper::LoadNumbersAsIntegers(MacroAssembler* masm) {
__ bind(&rdx_is_object);
IntegerConvert(masm, rdx, rdx); // Uses rdi, rcx and rbx.
__ JumpIfNotSmi(rax, &rax_is_object);
- __ bind(&rax_is_smi);
__ SmiToInteger32(rcx, rax);
__ bind(&done);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698