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

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

Issue 7001025: Remove support for branch hints from the IA32 and X64 assembler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 emit_modrm(0, dst); 1208 emit_modrm(0, dst);
1209 } 1209 }
1210 1210
1211 1211
1212 void Assembler::int3() { 1212 void Assembler::int3() {
1213 EnsureSpace ensure_space(this); 1213 EnsureSpace ensure_space(this);
1214 emit(0xCC); 1214 emit(0xCC);
1215 } 1215 }
1216 1216
1217 1217
1218 void Assembler::j(Condition cc, Label* L, Hint hint, Label::Distance distance) { 1218 void Assembler::j(Condition cc, Label* L, Label::Distance distance) {
1219 if (cc == always) { 1219 if (cc == always) {
1220 jmp(L); 1220 jmp(L);
1221 return; 1221 return;
1222 } else if (cc == never) { 1222 } else if (cc == never) {
1223 return; 1223 return;
1224 } 1224 }
1225 EnsureSpace ensure_space(this); 1225 EnsureSpace ensure_space(this);
1226 ASSERT(is_uint4(cc)); 1226 ASSERT(is_uint4(cc));
1227 if (FLAG_emit_branch_hints && hint != no_hint) emit(hint);
1228 if (L->is_bound()) { 1227 if (L->is_bound()) {
1229 const int short_size = 2; 1228 const int short_size = 2;
1230 const int long_size = 6; 1229 const int long_size = 6;
1231 int offs = L->pos() - pc_offset(); 1230 int offs = L->pos() - pc_offset();
1232 ASSERT(offs <= 0); 1231 ASSERT(offs <= 0);
1233 if (is_int8(offs - short_size)) { 1232 if (is_int8(offs - short_size)) {
1234 // 0111 tttn #8-bit disp. 1233 // 0111 tttn #8-bit disp.
1235 emit(0x70 | cc); 1234 emit(0x70 | cc);
1236 emit((offs - short_size) & 0xFF); 1235 emit((offs - short_size) & 0xFF);
1237 } else { 1236 } else {
(...skipping 1781 matching lines...) Expand 10 before | Expand all | Expand 10 after
3019 // specially coded on x64 means that it is a relative 32 bit address, as used 3018 // specially coded on x64 means that it is a relative 32 bit address, as used
3020 // by branch instructions. 3019 // by branch instructions.
3021 return (1 << rmode_) & kApplyMask; 3020 return (1 << rmode_) & kApplyMask;
3022 } 3021 }
3023 3022
3024 3023
3025 3024
3026 } } // namespace v8::internal 3025 } } // namespace v8::internal
3027 3026
3028 #endif // V8_TARGET_ARCH_X64 3027 #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