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

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

Issue 191293012: Reland "Handle non-power-of-2 divisors in division-like operations". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 emit_modrm(dst, src); 1058 emit_modrm(dst, src);
1059 emit(imm.value_); 1059 emit(imm.value_);
1060 } else { 1060 } else {
1061 emit(0x69); 1061 emit(0x69);
1062 emit_modrm(dst, src); 1062 emit_modrm(dst, src);
1063 emitl(imm.value_); 1063 emitl(imm.value_);
1064 } 1064 }
1065 } 1065 }
1066 1066
1067 1067
1068 void Assembler::imull(Register src) {
1069 EnsureSpace ensure_space(this);
1070 emit_optional_rex_32(src);
1071 emit(0xF7);
1072 emit_modrm(0x5, src);
1073 }
1074
1075
1068 void Assembler::imull(Register dst, Register src) { 1076 void Assembler::imull(Register dst, Register src) {
1069 EnsureSpace ensure_space(this); 1077 EnsureSpace ensure_space(this);
1070 emit_optional_rex_32(dst, src); 1078 emit_optional_rex_32(dst, src);
1071 emit(0x0F); 1079 emit(0x0F);
1072 emit(0xAF); 1080 emit(0xAF);
1073 emit_modrm(dst, src); 1081 emit_modrm(dst, src);
1074 } 1082 }
1075 1083
1076 1084
1077 void Assembler::imull(Register dst, const Operand& src) { 1085 void Assembler::imull(Register dst, const Operand& src) {
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3200 bool RelocInfo::IsCodedSpecially() { 3208 bool RelocInfo::IsCodedSpecially() {
3201 // The deserializer needs to know whether a pointer is specially coded. Being 3209 // The deserializer needs to know whether a pointer is specially coded. Being
3202 // specially coded on x64 means that it is a relative 32 bit address, as used 3210 // specially coded on x64 means that it is a relative 32 bit address, as used
3203 // by branch instructions. 3211 // by branch instructions.
3204 return (1 << rmode_) & kApplyMask; 3212 return (1 << rmode_) & kApplyMask;
3205 } 3213 }
3206 3214
3207 } } // namespace v8::internal 3215 } } // namespace v8::internal
3208 3216
3209 #endif // V8_TARGET_ARCH_X64 3217 #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