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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 7307030: Implement ICs for FastDoubleArray loads and stores (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix asserts Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/globals.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 2782
2783 2783
2784 void LCodeGen::DoMathLog(LUnaryMathOperation* instr) { 2784 void LCodeGen::DoMathLog(LUnaryMathOperation* instr) {
2785 ASSERT(instr->value()->Equals(instr->result())); 2785 ASSERT(instr->value()->Equals(instr->result()));
2786 XMMRegister input_reg = ToDoubleRegister(instr->value()); 2786 XMMRegister input_reg = ToDoubleRegister(instr->value());
2787 Label positive, done, zero; 2787 Label positive, done, zero;
2788 __ xorps(xmm0, xmm0); 2788 __ xorps(xmm0, xmm0);
2789 __ ucomisd(input_reg, xmm0); 2789 __ ucomisd(input_reg, xmm0);
2790 __ j(above, &positive, Label::kNear); 2790 __ j(above, &positive, Label::kNear);
2791 __ j(equal, &zero, Label::kNear); 2791 __ j(equal, &zero, Label::kNear);
2792 ExternalReference nan = ExternalReference::address_of_nan(); 2792 ExternalReference nan =
2793 ExternalReference::address_of_canonical_non_hole_nan();
2793 __ movdbl(input_reg, Operand::StaticVariable(nan)); 2794 __ movdbl(input_reg, Operand::StaticVariable(nan));
2794 __ jmp(&done, Label::kNear); 2795 __ jmp(&done, Label::kNear);
2795 __ bind(&zero); 2796 __ bind(&zero);
2796 __ push(Immediate(0xFFF00000)); 2797 __ push(Immediate(0xFFF00000));
2797 __ push(Immediate(0)); 2798 __ push(Immediate(0));
2798 __ movdbl(input_reg, Operand(esp, 0)); 2799 __ movdbl(input_reg, Operand(esp, 0));
2799 __ add(Operand(esp), Immediate(kDoubleSize)); 2800 __ add(Operand(esp), Immediate(kDoubleSize));
2800 __ jmp(&done, Label::kNear); 2801 __ jmp(&done, Label::kNear);
2801 __ bind(&positive); 2802 __ bind(&positive);
2802 __ fldln2(); 2803 __ fldln2();
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
3443 if (deoptimize_on_undefined) { 3444 if (deoptimize_on_undefined) {
3444 DeoptimizeIf(not_equal, env); 3445 DeoptimizeIf(not_equal, env);
3445 } else { 3446 } else {
3446 Label heap_number; 3447 Label heap_number;
3447 __ j(equal, &heap_number, Label::kNear); 3448 __ j(equal, &heap_number, Label::kNear);
3448 3449
3449 __ cmp(input_reg, factory()->undefined_value()); 3450 __ cmp(input_reg, factory()->undefined_value());
3450 DeoptimizeIf(not_equal, env); 3451 DeoptimizeIf(not_equal, env);
3451 3452
3452 // Convert undefined to NaN. 3453 // Convert undefined to NaN.
3453 ExternalReference nan = ExternalReference::address_of_nan(); 3454 ExternalReference nan =
3455 ExternalReference::address_of_canonical_non_hole_nan();
3454 __ movdbl(result_reg, Operand::StaticVariable(nan)); 3456 __ movdbl(result_reg, Operand::StaticVariable(nan));
3455 __ jmp(&done, Label::kNear); 3457 __ jmp(&done, Label::kNear);
3456 3458
3457 __ bind(&heap_number); 3459 __ bind(&heap_number);
3458 } 3460 }
3459 // Heap number to XMM conversion. 3461 // Heap number to XMM conversion.
3460 __ movdbl(result_reg, FieldOperand(input_reg, HeapNumber::kValueOffset)); 3462 __ movdbl(result_reg, FieldOperand(input_reg, HeapNumber::kValueOffset));
3461 __ jmp(&done, Label::kNear); 3463 __ jmp(&done, Label::kNear);
3462 3464
3463 // Smi to XMM conversion 3465 // Smi to XMM conversion
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
4260 env->deoptimization_index()); 4262 env->deoptimization_index());
4261 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4263 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4262 } 4264 }
4263 4265
4264 4266
4265 #undef __ 4267 #undef __
4266 4268
4267 } } // namespace v8::internal 4269 } } // namespace v8::internal
4268 4270
4269 #endif // V8_TARGET_ARCH_IA32 4271 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698