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

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

Issue 6303012: Truncate rather than round to nearest when performing float-to-integer... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
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
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
2724 void Assembler::cvttsd2si(Register dst, const Operand& src) { 2735 void Assembler::cvttsd2si(Register dst, const Operand& src) {
2725 EnsureSpace ensure_space(this); 2736 EnsureSpace ensure_space(this);
2726 last_pc_ = pc_; 2737 last_pc_ = pc_;
2727 emit(0xF2); 2738 emit(0xF2);
2728 emit_optional_rex_32(dst, src); 2739 emit_optional_rex_32(dst, src);
2729 emit(0x0F); 2740 emit(0x0F);
2730 emit(0x2C); 2741 emit(0x2C);
2731 emit_operand(dst, src); 2742 emit_operand(dst, src);
2732 } 2743 }
2733 2744
2734 2745
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
2735 void Assembler::cvttsd2siq(Register dst, XMMRegister src) { 2757 void Assembler::cvttsd2siq(Register dst, XMMRegister src) {
2736 EnsureSpace ensure_space(this); 2758 EnsureSpace ensure_space(this);
2737 last_pc_ = pc_; 2759 last_pc_ = pc_;
2738 emit(0xF2); 2760 emit(0xF2);
2739 emit_rex_64(dst, src); 2761 emit_rex_64(dst, src);
2740 emit(0x0F); 2762 emit(0x0F);
2741 emit(0x2C); 2763 emit(0x2C);
2742 emit_sse_operand(dst, src); 2764 emit_sse_operand(dst, src);
2743 } 2765 }
2744 2766
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3007 // specially coded on x64 means that it is a relative 32 bit address, as used 3029 // specially coded on x64 means that it is a relative 32 bit address, as used
3008 // by branch instructions. 3030 // by branch instructions.
3009 return (1 << rmode_) & kApplyMask; 3031 return (1 << rmode_) & kApplyMask;
3010 } 3032 }
3011 3033
3012 3034
3013 3035
3014 } } // namespace v8::internal 3036 } } // namespace v8::internal
3015 3037
3016 #endif // V8_TARGET_ARCH_X64 3038 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698