OLD | NEW |
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 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2839 | 2839 |
2840 void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, | 2840 void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, |
2841 XMMRegister temp_xmm_reg, | 2841 XMMRegister temp_xmm_reg, |
2842 Register result_reg, | 2842 Register result_reg, |
2843 Register temp_reg) { | 2843 Register temp_reg) { |
2844 Label done; | 2844 Label done; |
2845 Set(result_reg, 0); | 2845 Set(result_reg, 0); |
2846 xorps(temp_xmm_reg, temp_xmm_reg); | 2846 xorps(temp_xmm_reg, temp_xmm_reg); |
2847 ucomisd(input_reg, temp_xmm_reg); | 2847 ucomisd(input_reg, temp_xmm_reg); |
2848 j(below, &done, Label::kNear); | 2848 j(below, &done, Label::kNear); |
2849 uint64_t one_half = BitCast<uint64_t, double>(0.5); | 2849 cvtsd2si(result_reg, input_reg); |
2850 Set(temp_reg, one_half); | |
2851 movq(temp_xmm_reg, temp_reg); | |
2852 addsd(temp_xmm_reg, input_reg); | |
2853 cvttsd2si(result_reg, temp_xmm_reg); | |
2854 testl(result_reg, Immediate(0xFFFFFF00)); | 2850 testl(result_reg, Immediate(0xFFFFFF00)); |
2855 j(zero, &done, Label::kNear); | 2851 j(zero, &done, Label::kNear); |
2856 Set(result_reg, 255); | 2852 Set(result_reg, 255); |
2857 bind(&done); | 2853 bind(&done); |
2858 } | 2854 } |
2859 | 2855 |
2860 | 2856 |
2861 void MacroAssembler::LoadInstanceDescriptors(Register map, | 2857 void MacroAssembler::LoadInstanceDescriptors(Register map, |
2862 Register descriptors) { | 2858 Register descriptors) { |
2863 Register temp = descriptors; | 2859 Register temp = descriptors; |
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4505 bind(&check_prototype); | 4501 bind(&check_prototype); |
4506 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); | 4502 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); |
4507 cmpq(rcx, null_value); | 4503 cmpq(rcx, null_value); |
4508 j(not_equal, &next); | 4504 j(not_equal, &next); |
4509 } | 4505 } |
4510 | 4506 |
4511 | 4507 |
4512 } } // namespace v8::internal | 4508 } } // namespace v8::internal |
4513 | 4509 |
4514 #endif // V8_TARGET_ARCH_X64 | 4510 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |