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

Side by Side Diff: runtime/vm/assembler_x64.h

Issue 869533003: VM: Emit compacter code for x64 branches to external labels. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | « no previous file | runtime/vm/assembler_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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ASSEMBLER_X64_H_ 5 #ifndef VM_ASSEMBLER_X64_H_
6 #define VM_ASSEMBLER_X64_H_ 6 #define VM_ASSEMBLER_X64_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_x64.h directly; use assembler.h instead. 9 #error Do not include assembler_x64.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 /* 347 /*
348 * Emit Machine Instructions. 348 * Emit Machine Instructions.
349 */ 349 */
350 void call(Register reg); 350 void call(Register reg);
351 void call(const Address& address); 351 void call(const Address& address);
352 void call(Label* label); 352 void call(Label* label);
353 void call(const ExternalLabel* label); 353 void call(const ExternalLabel* label);
354 354
355 static const intptr_t kCallExternalLabelSize = 7; 355 static const intptr_t kCallExternalLabelSize = 7;
356 static const intptr_t kJmpExternalLabelSize = 10;
357 356
358 void pushq(Register reg); 357 void pushq(Register reg);
359 void pushq(const Address& address); 358 void pushq(const Address& address);
360 void pushq(const Immediate& imm); 359 void pushq(const Immediate& imm);
361 void PushImmediate(const Immediate& imm, Register pp); 360 void PushImmediate(const Immediate& imm, Register pp);
362 361
363 void popq(Register reg); 362 void popq(Register reg);
364 void popq(const Address& address); 363 void popq(const Address& address);
365 364
366 void setcc(Condition condition, ByteRegister dst); 365 void setcc(Condition condition, ByteRegister dst);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 // 'size' indicates size in bytes and must be in the range 1..8. 661 // 'size' indicates size in bytes and must be in the range 1..8.
663 void nop(int size = 1); 662 void nop(int size = 1);
664 void int3(); 663 void int3();
665 void hlt(); 664 void hlt();
666 665
667 // Note: verified_mem mode forces far jumps. 666 // Note: verified_mem mode forces far jumps.
668 void j(Condition condition, Label* label, bool near = kFarJump); 667 void j(Condition condition, Label* label, bool near = kFarJump);
669 void j(Condition condition, const ExternalLabel* label); 668 void j(Condition condition, const ExternalLabel* label);
670 669
671 void jmp(Register reg); 670 void jmp(Register reg);
671 void jmp(const Address& address);
672 // Note: verified_mem mode forces far jumps. 672 // Note: verified_mem mode forces far jumps.
673 void jmp(Label* label, bool near = kFarJump); 673 void jmp(Label* label, bool near = kFarJump);
674 void jmp(const ExternalLabel* label); 674 void jmp(const ExternalLabel* label);
675 675
676 void lock(); 676 void lock();
677 void cmpxchgl(const Address& address, Register reg); 677 void cmpxchgl(const Address& address, Register reg);
678 void lock_cmpxchgl(const Address& address, Register reg) { 678 void lock_cmpxchgl(const Address& address, Register reg) {
679 lock(); 679 lock();
680 cmpxchgl(address, reg); 680 cmpxchgl(address, reg);
681 } 681 }
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 } 1188 }
1189 1189
1190 1190
1191 inline void Assembler::EmitOperandSizeOverride() { 1191 inline void Assembler::EmitOperandSizeOverride() {
1192 EmitUint8(0x66); 1192 EmitUint8(0x66);
1193 } 1193 }
1194 1194
1195 } // namespace dart 1195 } // namespace dart
1196 1196
1197 #endif // VM_ASSEMBLER_X64_H_ 1197 #endif // VM_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698