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

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

Issue 6460038: Version 3.1.3.... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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/code-stubs-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 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 EnsureSpace ensure_space(this); 3079 EnsureSpace ensure_space(this);
3070 emitl(data); 3080 emitl(data);
3071 } 3081 }
3072 3082
3073 3083
3074 // Relocation information implementations. 3084 // Relocation information implementations.
3075 3085
3076 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 3086 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
3077 ASSERT(rmode != RelocInfo::NONE); 3087 ASSERT(rmode != RelocInfo::NONE);
3078 // Don't record external references unless the heap will be serialized. 3088 // Don't record external references unless the heap will be serialized.
3079 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 3089 if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
3080 !Serializer::enabled() && 3090 #ifdef DEBUG
3081 !FLAG_debug_code) { 3091 if (!Serializer::enabled()) {
3082 return; 3092 Serializer::TooLateToEnableNow();
3093 }
3094 #endif
3095 if (!Serializer::enabled() && !FLAG_debug_code) {
3096 return;
3097 }
3083 } 3098 }
3084 RelocInfo rinfo(pc_, rmode, data); 3099 RelocInfo rinfo(pc_, rmode, data);
3085 reloc_info_writer.Write(&rinfo); 3100 reloc_info_writer.Write(&rinfo);
3086 } 3101 }
3087 3102
3088 void Assembler::RecordJSReturn() { 3103 void Assembler::RecordJSReturn() {
3089 positions_recorder()->WriteRecordedPositions(); 3104 positions_recorder()->WriteRecordedPositions();
3090 EnsureSpace ensure_space(this); 3105 EnsureSpace ensure_space(this);
3091 RecordRelocInfo(RelocInfo::JS_RETURN); 3106 RecordRelocInfo(RelocInfo::JS_RETURN);
3092 } 3107 }
(...skipping 23 matching lines...) Expand all
3116 // 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
3117 // by branch instructions. 3132 // by branch instructions.
3118 return (1 << rmode_) & kApplyMask; 3133 return (1 << rmode_) & kApplyMask;
3119 } 3134 }
3120 3135
3121 3136
3122 3137
3123 } } // namespace v8::internal 3138 } } // namespace v8::internal
3124 3139
3125 #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/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698