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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 10778029: Allow uint32 value on optimized frames if they are consumed by safe operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm and x64 ports Created 8 years, 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2493 7, 2493 7,
2494 -1, 2494 -1,
2495 8, 2495 8,
2496 -1, 2496 -1,
2497 -1, 2497 -1,
2498 9, 2498 9,
2499 10 2499 10
2500 }; 2500 };
2501 2501
2502 2502
2503 void MacroAssembler::StoreToSafepointRegisterSlot(Register dst,
2504 const Immediate& imm) {
2505 movq(SafepointRegisterSlot(dst), imm);
2506 }
2507
2508
2503 void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Register src) { 2509 void MacroAssembler::StoreToSafepointRegisterSlot(Register dst, Register src) {
2504 movq(SafepointRegisterSlot(dst), src); 2510 movq(SafepointRegisterSlot(dst), src);
2505 } 2511 }
2506 2512
2507 2513
2508 void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) { 2514 void MacroAssembler::LoadFromSafepointRegisterSlot(Register dst, Register src) {
2509 movq(dst, SafepointRegisterSlot(src)); 2515 movq(dst, SafepointRegisterSlot(src));
2510 } 2516 }
2511 2517
2512 2518
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2851 movq(temp_xmm_reg, temp_reg); 2857 movq(temp_xmm_reg, temp_reg);
2852 addsd(temp_xmm_reg, input_reg); 2858 addsd(temp_xmm_reg, input_reg);
2853 cvttsd2si(result_reg, temp_xmm_reg); 2859 cvttsd2si(result_reg, temp_xmm_reg);
2854 testl(result_reg, Immediate(0xFFFFFF00)); 2860 testl(result_reg, Immediate(0xFFFFFF00));
2855 j(zero, &done, Label::kNear); 2861 j(zero, &done, Label::kNear);
2856 Set(result_reg, 255); 2862 Set(result_reg, 255);
2857 bind(&done); 2863 bind(&done);
2858 } 2864 }
2859 2865
2860 2866
2867 static double kUint32Bias =
2868 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1;
2869
2870
2871 void MacroAssembler::LoadUint32(XMMRegister dst,
2872 Register src,
2873 XMMRegister scratch) {
2874 Label done;
2875 cmpl(src, Immediate(0));
2876 movq(kScratchRegister,
2877 reinterpret_cast<int64_t>(&kUint32Bias),
2878 RelocInfo::NONE);
2879 movsd(scratch, Operand(kScratchRegister, 0));
2880 cvtlsi2sd(dst, src);
2881 j(not_sign, &done, Label::kNear);
2882 addsd(dst, scratch);
2883 bind(&done);
2884 }
2885
2886
2861 void MacroAssembler::LoadInstanceDescriptors(Register map, 2887 void MacroAssembler::LoadInstanceDescriptors(Register map,
2862 Register descriptors) { 2888 Register descriptors) {
2863 Register temp = descriptors; 2889 Register temp = descriptors;
2864 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); 2890 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset));
2865 2891
2866 Label ok, fail; 2892 Label ok, fail;
2867 CheckMap(temp, 2893 CheckMap(temp,
2868 isolate()->factory()->fixed_array_map(), 2894 isolate()->factory()->fixed_array_map(),
2869 &fail, 2895 &fail,
2870 DONT_DO_SMI_CHECK); 2896 DONT_DO_SMI_CHECK);
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
4501 bind(&check_prototype); 4527 bind(&check_prototype);
4502 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4528 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4503 cmpq(rcx, null_value); 4529 cmpq(rcx, null_value);
4504 j(not_equal, &next); 4530 j(not_equal, &next);
4505 } 4531 }
4506 4532
4507 4533
4508 } } // namespace v8::internal 4534 } } // namespace v8::internal
4509 4535
4510 #endif // V8_TARGET_ARCH_X64 4536 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698