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

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

Issue 6448001: x64: Add MulI and DivI to lithium instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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') | src/x64/lithium-codegen-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 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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 void Assembler::imull(Register dst, Register src) { 1181 void Assembler::imull(Register dst, Register src) {
1182 EnsureSpace ensure_space(this); 1182 EnsureSpace ensure_space(this);
1183 last_pc_ = pc_; 1183 last_pc_ = pc_;
1184 emit_optional_rex_32(dst, src); 1184 emit_optional_rex_32(dst, src);
1185 emit(0x0F); 1185 emit(0x0F);
1186 emit(0xAF); 1186 emit(0xAF);
1187 emit_modrm(dst, src); 1187 emit_modrm(dst, src);
1188 } 1188 }
1189 1189
1190 1190
1191 void Assembler::imull(Register dst, const Operand& src) {
1192 EnsureSpace ensure_space(this);
1193 last_pc_ = pc_;
1194 emit_optional_rex_32(dst, src);
1195 emit(0x0F);
1196 emit(0xAF);
1197 emit_operand(dst, src);
1198 }
1199
1200
1191 void Assembler::imull(Register dst, Register src, Immediate imm) { 1201 void Assembler::imull(Register dst, Register src, Immediate imm) {
1192 EnsureSpace ensure_space(this); 1202 EnsureSpace ensure_space(this);
1193 last_pc_ = pc_; 1203 last_pc_ = pc_;
1194 emit_optional_rex_32(dst, src); 1204 emit_optional_rex_32(dst, src);
1195 if (is_int8(imm.value_)) { 1205 if (is_int8(imm.value_)) {
1196 emit(0x6B); 1206 emit(0x6B);
1197 emit_modrm(dst, src); 1207 emit_modrm(dst, src);
1198 emit(imm.value_); 1208 emit(imm.value_);
1199 } else { 1209 } else {
1200 emit(0x69); 1210 emit(0x69);
(...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 // specially coded on x64 means that it is a relative 32 bit address, as used 3131 // specially coded on x64 means that it is a relative 32 bit address, as used
3122 // by branch instructions. 3132 // by branch instructions.
3123 return (1 << rmode_) & kApplyMask; 3133 return (1 << rmode_) & kApplyMask;
3124 } 3134 }
3125 3135
3126 3136
3127 3137
3128 } } // namespace v8::internal 3138 } } // namespace v8::internal
3129 3139
3130 #endif // V8_TARGET_ARCH_X64 3140 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698