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

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

Issue 596643003: [x64] three operand imul supports first operand in memory location (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/x64/assembler-x64.h ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 emit_modrm(dst, src); 935 emit_modrm(dst, src);
936 emit(imm.value_); 936 emit(imm.value_);
937 } else { 937 } else {
938 emit(0x69); 938 emit(0x69);
939 emit_modrm(dst, src); 939 emit_modrm(dst, src);
940 emitl(imm.value_); 940 emitl(imm.value_);
941 } 941 }
942 } 942 }
943 943
944 944
945 void Assembler::emit_imul(Register dst, const Operand& src, Immediate imm,
946 int size) {
947 EnsureSpace ensure_space(this);
948 emit_rex(dst, src, size);
949 if (is_int8(imm.value_)) {
950 emit(0x6B);
951 } else {
952 emit(0x69);
953 }
954 emit_operand(dst, src);
955 emit(imm.value_);
956 }
957
958
945 void Assembler::emit_inc(Register dst, int size) { 959 void Assembler::emit_inc(Register dst, int size) {
946 EnsureSpace ensure_space(this); 960 EnsureSpace ensure_space(this);
947 emit_rex(dst, size); 961 emit_rex(dst, size);
948 emit(0xFF); 962 emit(0xFF);
949 emit_modrm(0x0, dst); 963 emit_modrm(0x0, dst);
950 } 964 }
951 965
952 966
953 void Assembler::emit_inc(const Operand& dst, int size) { 967 void Assembler::emit_inc(const Operand& dst, int size) {
954 EnsureSpace ensure_space(this); 968 EnsureSpace ensure_space(this);
(...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 3025
3012 3026
3013 bool RelocInfo::IsInConstantPool() { 3027 bool RelocInfo::IsInConstantPool() {
3014 return false; 3028 return false;
3015 } 3029 }
3016 3030
3017 3031
3018 } } // namespace v8::internal 3032 } } // namespace v8::internal
3019 3033
3020 #endif // V8_TARGET_ARCH_X64 3034 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698