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

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

Issue 829133006: VM: Small generated code size improvements on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 static const bool kFarJump = false; 345 static const bool kFarJump = false;
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 = 10; 355 static const intptr_t kCallExternalLabelSize = 7;
356 static const intptr_t kJmpExternalLabelSize = 10;
356 357
357 void pushq(Register reg); 358 void pushq(Register reg);
358 void pushq(const Address& address); 359 void pushq(const Address& address);
359 void pushq(const Immediate& imm); 360 void pushq(const Immediate& imm);
360 void PushImmediate(const Immediate& imm, Register pp); 361 void PushImmediate(const Immediate& imm, Register pp);
361 362
362 void popq(Register reg); 363 void popq(Register reg);
363 void popq(const Address& address); 364 void popq(const Address& address);
364 365
365 void setcc(Condition condition, ByteRegister dst); 366 void setcc(Condition condition, ByteRegister dst);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 // Macros accepting a pp Register argument may attempt to load values from 720 // Macros accepting a pp Register argument may attempt to load values from
720 // the object pool when possible. Unless you are sure that the untagged object 721 // the object pool when possible. Unless you are sure that the untagged object
721 // pool pointer is in another register, or that it is not available at all, 722 // pool pointer is in another register, or that it is not available at all,
722 // PP should be passed for pp. 723 // PP should be passed for pp.
723 // TODO(koda): Assert that these are not used for heap objects. 724 // TODO(koda): Assert that these are not used for heap objects.
724 void AddImmediate(Register reg, const Immediate& imm, Register pp); 725 void AddImmediate(Register reg, const Immediate& imm, Register pp);
725 void AddImmediate(const Address& address, const Immediate& imm, Register pp); 726 void AddImmediate(const Address& address, const Immediate& imm, Register pp);
726 void SubImmediate(Register reg, const Immediate& imm, Register pp); 727 void SubImmediate(Register reg, const Immediate& imm, Register pp);
727 void SubImmediate(const Address& address, const Immediate& imm, Register pp); 728 void SubImmediate(const Address& address, const Immediate& imm, Register pp);
728 729
729 void Drop(intptr_t stack_elements); 730 void Drop(intptr_t stack_elements, Register tmp = TMP);
730 731
731 enum Patchability { 732 enum Patchability {
732 kPatchable, 733 kPatchable,
733 kNotPatchable, 734 kNotPatchable,
734 }; 735 };
735 736
736 bool allow_constant_pool() const { 737 bool allow_constant_pool() const {
737 return allow_constant_pool_; 738 return allow_constant_pool_;
738 } 739 }
739 void set_allow_constant_pool(bool b) { 740 void set_allow_constant_pool(bool b) {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 } 1198 }
1198 1199
1199 1200
1200 inline void Assembler::EmitOperandSizeOverride() { 1201 inline void Assembler::EmitOperandSizeOverride() {
1201 EmitUint8(0x66); 1202 EmitUint8(0x66);
1202 } 1203 }
1203 1204
1204 } // namespace dart 1205 } // namespace dart
1205 1206
1206 #endif // VM_ASSEMBLER_X64_H_ 1207 #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