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

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

Issue 1584663007: [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 3112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3123 emit_sse_operand(dst, src); 3123 emit_sse_operand(dst, src);
3124 } 3124 }
3125 3125
3126 3126
3127 void Assembler::cvttss2siq(Register dst, const Operand& src) { 3127 void Assembler::cvttss2siq(Register dst, const Operand& src) {
3128 DCHECK(!IsEnabled(AVX)); 3128 DCHECK(!IsEnabled(AVX));
3129 EnsureSpace ensure_space(this); 3129 EnsureSpace ensure_space(this);
3130 emit(0xF3); 3130 emit(0xF3);
3131 emit_rex_64(dst, src); 3131 emit_rex_64(dst, src);
3132 emit(0x0F); 3132 emit(0x0F);
3133 emit(0x2D);
3134 emit_sse_operand(dst, src);
3135 }
3136
3137
3138 void Assembler::cvtss2siq(Register dst, XMMRegister src) {
3139 DCHECK(!IsEnabled(AVX));
3140 EnsureSpace ensure_space(this);
3141 emit(0xF3);
3142 emit_rex_64(dst, src);
3143 emit(0x0F);
3144 emit(0x2D);
3145 emit_sse_operand(dst, src);
3146 }
3147
3148
3149 void Assembler::cvtss2siq(Register dst, const Operand& src) {
3150 DCHECK(!IsEnabled(AVX));
3151 EnsureSpace ensure_space(this);
3152 emit(0xF3);
3153 emit_rex_64(dst, src);
3154 emit(0x0F);
3133 emit(0x2C); 3155 emit(0x2C);
3134 emit_sse_operand(dst, src); 3156 emit_sse_operand(dst, src);
3135 } 3157 }
3136 3158
3137 3159
3138 void Assembler::cvttsd2siq(Register dst, XMMRegister src) { 3160 void Assembler::cvttsd2siq(Register dst, XMMRegister src) {
3139 DCHECK(!IsEnabled(AVX)); 3161 DCHECK(!IsEnabled(AVX));
3140 EnsureSpace ensure_space(this); 3162 EnsureSpace ensure_space(this);
3141 emit(0xF2); 3163 emit(0xF2);
3142 emit_rex_64(dst, src); 3164 emit_rex_64(dst, src);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3292 DCHECK(!IsEnabled(AVX)); 3314 DCHECK(!IsEnabled(AVX));
3293 EnsureSpace ensure_space(this); 3315 EnsureSpace ensure_space(this);
3294 emit(0xF2); 3316 emit(0xF2);
3295 emit_rex_64(dst, src); 3317 emit_rex_64(dst, src);
3296 emit(0x0F); 3318 emit(0x0F);
3297 emit(0x2D); 3319 emit(0x2D);
3298 emit_sse_operand(dst, src); 3320 emit_sse_operand(dst, src);
3299 } 3321 }
3300 3322
3301 3323
3324 void Assembler::cvtsd2siq(Register dst, const Operand& src) {
3325 DCHECK(!IsEnabled(AVX));
3326 EnsureSpace ensure_space(this);
3327 emit(0xF2);
3328 emit_rex_64(dst, src);
3329 emit(0x0F);
3330 emit(0x2D);
3331 emit_sse_operand(dst, src);
3332 }
3333
3334
3302 void Assembler::addsd(XMMRegister dst, XMMRegister src) { 3335 void Assembler::addsd(XMMRegister dst, XMMRegister src) {
3303 EnsureSpace ensure_space(this); 3336 EnsureSpace ensure_space(this);
3304 emit(0xF2); 3337 emit(0xF2);
3305 emit_optional_rex_32(dst, src); 3338 emit_optional_rex_32(dst, src);
3306 emit(0x0F); 3339 emit(0x0F);
3307 emit(0x58); 3340 emit(0x58);
3308 emit_sse_operand(dst, src); 3341 emit_sse_operand(dst, src);
3309 } 3342 }
3310 3343
3311 3344
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 emit_optional_rex_32(dst, src); 3561 emit_optional_rex_32(dst, src);
3529 emit(0x0f); 3562 emit(0x0f);
3530 emit(0x3a); 3563 emit(0x3a);
3531 emit(0x0b); 3564 emit(0x0b);
3532 emit_sse_operand(dst, src); 3565 emit_sse_operand(dst, src);
3533 // Mask precision exception. 3566 // Mask precision exception.
3534 emit(static_cast<byte>(mode) | 0x8); 3567 emit(static_cast<byte>(mode) | 0x8);
3535 } 3568 }
3536 3569
3537 3570
3571 void Assembler::ldmxcsr(const Operand& dst) {
3572 EnsureSpace ensure_space(this);
3573 emit(0x0F);
3574 emit(0xAE);
3575 emit_operand(2, dst);
3576 }
3577
3578
3579 void Assembler::stmxcsr(const Operand& dst) {
3580 EnsureSpace ensure_space(this);
3581 emit(0x0F);
3582 emit(0xAE);
3583 emit_operand(3, dst);
3584 }
3585
3586
3538 void Assembler::movmskpd(Register dst, XMMRegister src) { 3587 void Assembler::movmskpd(Register dst, XMMRegister src) {
3539 EnsureSpace ensure_space(this); 3588 EnsureSpace ensure_space(this);
3540 emit(0x66); 3589 emit(0x66);
3541 emit_optional_rex_32(dst, src); 3590 emit_optional_rex_32(dst, src);
3542 emit(0x0f); 3591 emit(0x0f);
3543 emit(0x50); 3592 emit(0x50);
3544 emit_sse_operand(dst, src); 3593 emit_sse_operand(dst, src);
3545 } 3594 }
3546 3595
3547 3596
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
4138 4187
4139 bool RelocInfo::IsInConstantPool() { 4188 bool RelocInfo::IsInConstantPool() {
4140 return false; 4189 return false;
4141 } 4190 }
4142 4191
4143 4192
4144 } // namespace internal 4193 } // namespace internal
4145 } // namespace v8 4194 } // namespace v8
4146 4195
4147 #endif // V8_TARGET_ARCH_X64 4196 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698