OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2714 EnsureSpace ensure_space(this); | 2714 EnsureSpace ensure_space(this); |
2715 last_pc_ = pc_; | 2715 last_pc_ = pc_; |
2716 emit(0xF3); | 2716 emit(0xF3); |
2717 emit_optional_rex_32(dst, src); | 2717 emit_optional_rex_32(dst, src); |
2718 emit(0x0F); | 2718 emit(0x0F); |
2719 emit(0x2C); | 2719 emit(0x2C); |
2720 emit_operand(dst, src); | 2720 emit_operand(dst, src); |
2721 } | 2721 } |
2722 | 2722 |
2723 | 2723 |
2724 void Assembler::cvttss2si(Register dst, XMMRegister src) { | |
2725 EnsureSpace ensure_space(this); | |
2726 last_pc_ = pc_; | |
2727 emit(0xF3); | |
2728 emit_optional_rex_32(dst, src); | |
2729 emit(0x0F); | |
2730 emit(0x2C); | |
2731 emit_sse_operand(dst, src); | |
2732 } | |
2733 | |
2734 | |
2735 void Assembler::cvttsd2si(Register dst, const Operand& src) { | 2724 void Assembler::cvttsd2si(Register dst, const Operand& src) { |
2736 EnsureSpace ensure_space(this); | 2725 EnsureSpace ensure_space(this); |
2737 last_pc_ = pc_; | 2726 last_pc_ = pc_; |
2738 emit(0xF2); | 2727 emit(0xF2); |
2739 emit_optional_rex_32(dst, src); | 2728 emit_optional_rex_32(dst, src); |
2740 emit(0x0F); | 2729 emit(0x0F); |
2741 emit(0x2C); | 2730 emit(0x2C); |
2742 emit_operand(dst, src); | 2731 emit_operand(dst, src); |
2743 } | 2732 } |
2744 | 2733 |
2745 | 2734 |
2746 void Assembler::cvttsd2si(Register dst, XMMRegister src) { | |
2747 EnsureSpace ensure_space(this); | |
2748 last_pc_ = pc_; | |
2749 emit(0xF2); | |
2750 emit_optional_rex_32(dst, src); | |
2751 emit(0x0F); | |
2752 emit(0x2C); | |
2753 emit_sse_operand(dst, src); | |
2754 } | |
2755 | |
2756 | |
2757 void Assembler::cvttsd2siq(Register dst, XMMRegister src) { | 2735 void Assembler::cvttsd2siq(Register dst, XMMRegister src) { |
2758 EnsureSpace ensure_space(this); | 2736 EnsureSpace ensure_space(this); |
2759 last_pc_ = pc_; | 2737 last_pc_ = pc_; |
2760 emit(0xF2); | 2738 emit(0xF2); |
2761 emit_rex_64(dst, src); | 2739 emit_rex_64(dst, src); |
2762 emit(0x0F); | 2740 emit(0x0F); |
2763 emit(0x2C); | 2741 emit(0x2C); |
2764 emit_sse_operand(dst, src); | 2742 emit_sse_operand(dst, src); |
2765 } | 2743 } |
2766 | 2744 |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3029 // specially coded on x64 means that it is a relative 32 bit address, as used | 3007 // specially coded on x64 means that it is a relative 32 bit address, as used |
3030 // by branch instructions. | 3008 // by branch instructions. |
3031 return (1 << rmode_) & kApplyMask; | 3009 return (1 << rmode_) & kApplyMask; |
3032 } | 3010 } |
3033 | 3011 |
3034 | 3012 |
3035 | 3013 |
3036 } } // namespace v8::internal | 3014 } } // namespace v8::internal |
3037 | 3015 |
3038 #endif // V8_TARGET_ARCH_X64 | 3016 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |