OLD | NEW |
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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 void call(Register reg); | 363 void call(Register reg); |
364 void call(const Address& address); | 364 void call(const Address& address); |
365 void call(Label* label); | 365 void call(Label* label); |
366 void call(const ExternalLabel* label); | 366 void call(const ExternalLabel* label); |
367 | 367 |
368 static const intptr_t kCallExternalLabelSize = 7; | 368 static const intptr_t kCallExternalLabelSize = 7; |
369 | 369 |
370 void pushq(Register reg); | 370 void pushq(Register reg); |
371 void pushq(const Address& address); | 371 void pushq(const Address& address); |
372 void pushq(const Immediate& imm); | 372 void pushq(const Immediate& imm); |
373 void PushImmediate(const Immediate& imm, Register pp); | 373 void PushImmediate(const Immediate& imm); |
374 | 374 |
375 void popq(Register reg); | 375 void popq(Register reg); |
376 void popq(const Address& address); | 376 void popq(const Address& address); |
377 | 377 |
378 void setcc(Condition condition, ByteRegister dst); | 378 void setcc(Condition condition, ByteRegister dst); |
379 | 379 |
380 void movl(Register dst, Register src); | 380 void movl(Register dst, Register src); |
381 void movl(Register dst, const Immediate& imm); | 381 void movl(Register dst, const Immediate& imm); |
382 void movl(Register dst, const Address& src); | 382 void movl(Register dst, const Address& src); |
383 void movl(const Address& dst, Register src); | 383 void movl(const Address& dst, Register src); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 void cmpl(Register reg0, Register reg1); | 520 void cmpl(Register reg0, Register reg1); |
521 void cmpl(Register reg, const Address& address); | 521 void cmpl(Register reg, const Address& address); |
522 void cmpl(const Address& address, const Immediate& imm); | 522 void cmpl(const Address& address, const Immediate& imm); |
523 | 523 |
524 void cmpq(Register reg, const Immediate& imm); | 524 void cmpq(Register reg, const Immediate& imm); |
525 void cmpq(const Address& address, Register reg); | 525 void cmpq(const Address& address, Register reg); |
526 void cmpq(const Address& address, const Immediate& imm); | 526 void cmpq(const Address& address, const Immediate& imm); |
527 void cmpq(Register reg0, Register reg1); | 527 void cmpq(Register reg0, Register reg1); |
528 void cmpq(Register reg, const Address& address); | 528 void cmpq(Register reg, const Address& address); |
529 | 529 |
530 void CompareImmediate(Register reg, const Immediate& imm, Register pp); | 530 void CompareImmediate(Register reg, const Immediate& imm); |
531 void CompareImmediate(const Address& address, const Immediate& imm, | 531 void CompareImmediate(const Address& address, const Immediate& imm); |
532 Register pp); | |
533 | 532 |
534 void testl(Register reg1, Register reg2); | 533 void testl(Register reg1, Register reg2); |
535 void testl(Register reg, const Immediate& imm); | 534 void testl(Register reg, const Immediate& imm); |
536 void testb(const Address& address, const Immediate& imm); | 535 void testb(const Address& address, const Immediate& imm); |
537 | 536 |
538 void testq(Register reg1, Register reg2); | 537 void testq(Register reg1, Register reg2); |
539 void testq(Register reg, const Immediate& imm); | 538 void testq(Register reg, const Immediate& imm); |
540 void TestImmediate(Register dst, const Immediate& imm, Register pp); | 539 void TestImmediate(Register dst, const Immediate& imm); |
541 | 540 |
542 void andl(Register dst, Register src); | 541 void andl(Register dst, Register src); |
543 void andl(Register dst, const Immediate& imm); | 542 void andl(Register dst, const Immediate& imm); |
544 | 543 |
545 void orl(Register dst, Register src); | 544 void orl(Register dst, Register src); |
546 void orl(Register dst, const Immediate& imm); | 545 void orl(Register dst, const Immediate& imm); |
547 void orl(const Address& dst, Register src); | 546 void orl(const Address& dst, Register src); |
548 | 547 |
549 void xorl(Register dst, Register src); | 548 void xorl(Register dst, Register src); |
550 | 549 |
551 void andq(Register dst, Register src); | 550 void andq(Register dst, Register src); |
552 void andq(Register dst, const Address& address); | 551 void andq(Register dst, const Address& address); |
553 void andq(Register dst, const Immediate& imm); | 552 void andq(Register dst, const Immediate& imm); |
554 void AndImmediate(Register dst, const Immediate& imm, Register pp); | 553 void AndImmediate(Register dst, const Immediate& imm); |
555 | 554 |
556 void orq(Register dst, Register src); | 555 void orq(Register dst, Register src); |
557 void orq(Register dst, const Address& address); | 556 void orq(Register dst, const Address& address); |
558 void orq(Register dst, const Immediate& imm); | 557 void orq(Register dst, const Immediate& imm); |
559 void OrImmediate(Register dst, const Immediate& imm, Register pp); | 558 void OrImmediate(Register dst, const Immediate& imm); |
560 | 559 |
561 void xorq(Register dst, Register src); | 560 void xorq(Register dst, Register src); |
562 void xorq(Register dst, const Address& address); | 561 void xorq(Register dst, const Address& address); |
563 void xorq(const Address& dst, Register src); | 562 void xorq(const Address& dst, Register src); |
564 void xorq(Register dst, const Immediate& imm); | 563 void xorq(Register dst, const Immediate& imm); |
565 void XorImmediate(Register dst, const Immediate& imm, Register pp); | 564 void XorImmediate(Register dst, const Immediate& imm); |
566 | 565 |
567 void addl(Register dst, Register src); | 566 void addl(Register dst, Register src); |
568 void addl(Register dst, const Immediate& imm); | 567 void addl(Register dst, const Immediate& imm); |
569 void addl(Register dst, const Address& address); | 568 void addl(Register dst, const Address& address); |
570 void addl(const Address& address, Register src); | 569 void addl(const Address& address, Register src); |
571 void adcl(Register dst, Register src); | 570 void adcl(Register dst, Register src); |
572 void adcl(Register dst, const Immediate& imm); | 571 void adcl(Register dst, const Immediate& imm); |
573 void adcl(Register dst, const Address& address); | 572 void adcl(Register dst, const Address& address); |
574 | 573 |
575 void addq(Register dst, Register src); | 574 void addq(Register dst, Register src); |
(...skipping 14 matching lines...) Expand all Loading... |
590 void idivq(Register reg); | 589 void idivq(Register reg); |
591 void divq(Register reg); | 590 void divq(Register reg); |
592 | 591 |
593 void imull(Register dst, Register src); | 592 void imull(Register dst, Register src); |
594 void imull(Register reg, const Immediate& imm); | 593 void imull(Register reg, const Immediate& imm); |
595 void mull(Register reg); | 594 void mull(Register reg); |
596 | 595 |
597 void imulq(Register dst, Register src); | 596 void imulq(Register dst, Register src); |
598 void imulq(Register dst, const Address& address); | 597 void imulq(Register dst, const Address& address); |
599 void imulq(Register dst, const Immediate& imm); | 598 void imulq(Register dst, const Immediate& imm); |
600 void MulImmediate(Register reg, const Immediate& imm, Register pp); | 599 void MulImmediate(Register reg, const Immediate& imm); |
601 void mulq(Register reg); | 600 void mulq(Register reg); |
602 | 601 |
603 void subl(Register dst, Register src); | 602 void subl(Register dst, Register src); |
604 void subl(Register dst, const Immediate& imm); | 603 void subl(Register dst, const Immediate& imm); |
605 void subl(Register dst, const Address& address); | 604 void subl(Register dst, const Address& address); |
606 void sbbl(Register dst, Register src); | 605 void sbbl(Register dst, Register src); |
607 void sbbl(Register dst, const Immediate& imm); | 606 void sbbl(Register dst, const Immediate& imm); |
608 void sbbl(Register dst, const Address& address); | 607 void sbbl(Register dst, const Address& address); |
609 | 608 |
610 void subq(Register dst, Register src); | 609 void subq(Register dst, Register src); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 /* | 731 /* |
733 * Macros for High-level operations and implemented on all architectures. | 732 * Macros for High-level operations and implemented on all architectures. |
734 */ | 733 */ |
735 | 734 |
736 void CompareRegisters(Register a, Register b); | 735 void CompareRegisters(Register a, Register b); |
737 | 736 |
738 // Issues a move instruction if 'to' is not the same as 'from'. | 737 // Issues a move instruction if 'to' is not the same as 'from'. |
739 void MoveRegister(Register to, Register from); | 738 void MoveRegister(Register to, Register from); |
740 void PopRegister(Register r); | 739 void PopRegister(Register r); |
741 | 740 |
742 // Macros accepting a pp Register argument may attempt to load values from | 741 // Macros for adding/subtracting an immediate value that may be loaded from |
743 // the object pool when possible. Unless you are sure that the untagged object | 742 // the constant pool. |
744 // pool pointer is in another register, or that it is not available at all, | |
745 // PP should be passed for pp. | |
746 // TODO(koda): Assert that these are not used for heap objects. | 743 // TODO(koda): Assert that these are not used for heap objects. |
747 void AddImmediate(Register reg, const Immediate& imm, Register pp); | 744 void AddImmediate(Register reg, const Immediate& imm); |
748 void AddImmediate(const Address& address, const Immediate& imm, Register pp); | 745 void AddImmediate(const Address& address, const Immediate& imm); |
749 void SubImmediate(Register reg, const Immediate& imm, Register pp); | 746 void SubImmediate(Register reg, const Immediate& imm); |
750 void SubImmediate(const Address& address, const Immediate& imm, Register pp); | 747 void SubImmediate(const Address& address, const Immediate& imm); |
751 | 748 |
752 void Drop(intptr_t stack_elements, Register tmp = TMP); | 749 void Drop(intptr_t stack_elements, Register tmp = TMP); |
753 | 750 |
754 bool constant_pool_allowed() const { | 751 bool constant_pool_allowed() const { |
755 return constant_pool_allowed_; | 752 return constant_pool_allowed_; |
756 } | 753 } |
757 void set_constant_pool_allowed(bool b) { | 754 void set_constant_pool_allowed(bool b) { |
758 constant_pool_allowed_ = b; | 755 constant_pool_allowed_ = b; |
759 } | 756 } |
760 | 757 |
761 bool CanLoadImmediateFromPool(const Immediate& imm, Register pp); | 758 void LoadImmediate(Register reg, const Immediate& imm); |
762 void LoadImmediate(Register reg, const Immediate& imm, Register pp); | |
763 void LoadIsolate(Register dst); | 759 void LoadIsolate(Register dst); |
764 void LoadObject(Register dst, const Object& obj, Register pp); | 760 void LoadObject(Register dst, const Object& obj); |
765 void LoadUniqueObject(Register dst, const Object& obj, Register pp); | 761 void LoadUniqueObject(Register dst, const Object& obj); |
766 void LoadExternalLabel(Register dst, | 762 void LoadExternalLabel(Register dst, |
767 const ExternalLabel* label, | 763 const ExternalLabel* label, |
768 Patchability patchable, | 764 Patchability patchable); |
769 Register pp); | 765 void LoadFunctionFromCalleePool(Register dst, |
| 766 const Function& function, |
| 767 Register new_pp); |
770 void JmpPatchable(const ExternalLabel* label, Register pp); | 768 void JmpPatchable(const ExternalLabel* label, Register pp); |
771 void Jmp(const ExternalLabel* label, Register pp); | 769 void Jmp(const ExternalLabel* label, Register pp); |
772 void J(Condition condition, const ExternalLabel* label, Register pp); | 770 void J(Condition condition, const ExternalLabel* label, Register pp); |
773 void CallPatchable(const ExternalLabel* label); | 771 void CallPatchable(const ExternalLabel* label); |
774 void Call(const ExternalLabel* label, Register pp); | 772 void Call(const ExternalLabel* label); |
775 // Unaware of write barrier (use StoreInto* methods for storing to objects). | 773 // Unaware of write barrier (use StoreInto* methods for storing to objects). |
776 // TODO(koda): Add StackAddress/HeapAddress types to prevent misuse. | 774 // TODO(koda): Add StackAddress/HeapAddress types to prevent misuse. |
777 void StoreObject(const Address& dst, const Object& obj, Register pp); | 775 void StoreObject(const Address& dst, const Object& obj); |
778 void PushObject(const Object& object, Register pp); | 776 void PushObject(const Object& object); |
779 void CompareObject(Register reg, const Object& object, Register pp); | 777 void CompareObject(Register reg, const Object& object); |
780 | 778 |
781 // When storing into a heap object field, knowledge of the previous content | 779 // When storing into a heap object field, knowledge of the previous content |
782 // is expressed through these constants. | 780 // is expressed through these constants. |
783 enum FieldContent { | 781 enum FieldContent { |
784 kEmptyOrSmiOrNull, // Empty = garbage/zapped in release/debug mode. | 782 kEmptyOrSmiOrNull, // Empty = garbage/zapped in release/debug mode. |
785 kHeapObjectOrSmi, | 783 kHeapObjectOrSmi, |
786 kOnlySmi, | 784 kOnlySmi, |
787 }; | 785 }; |
788 | 786 |
789 // Destroys value. | 787 // Destroys value. |
790 void StoreIntoObject(Register object, // Object we are storing into. | 788 void StoreIntoObject(Register object, // Object we are storing into. |
791 const Address& dest, // Where we are storing into. | 789 const Address& dest, // Where we are storing into. |
792 Register value, // Value we are storing. | 790 Register value, // Value we are storing. |
793 bool can_value_be_smi = true); | 791 bool can_value_be_smi = true); |
794 | 792 |
795 void StoreIntoObjectNoBarrier(Register object, | 793 void StoreIntoObjectNoBarrier(Register object, |
796 const Address& dest, | 794 const Address& dest, |
797 Register value, | 795 Register value, |
798 FieldContent old_content = kHeapObjectOrSmi); | 796 FieldContent old_content = kHeapObjectOrSmi); |
799 void InitializeFieldNoBarrier(Register object, | 797 void InitializeFieldNoBarrier(Register object, |
800 const Address& dest, | 798 const Address& dest, |
801 Register value) { | 799 Register value) { |
802 return StoreIntoObjectNoBarrier(object, dest, value, kEmptyOrSmiOrNull); | 800 return StoreIntoObjectNoBarrier(object, dest, value, kEmptyOrSmiOrNull); |
803 } | 801 } |
804 void StoreIntoObjectNoBarrier(Register object, | 802 void StoreIntoObjectNoBarrier(Register object, |
805 const Address& dest, | 803 const Address& dest, |
806 const Object& value, | 804 const Object& value, |
807 Register pp, | |
808 FieldContent old_content = kHeapObjectOrSmi); | 805 FieldContent old_content = kHeapObjectOrSmi); |
809 void InitializeFieldNoBarrier(Register object, | 806 void InitializeFieldNoBarrier(Register object, |
810 const Address& dest, | 807 const Address& dest, |
811 const Object& value, | 808 const Object& value) { |
812 Register pp) { | 809 return StoreIntoObjectNoBarrier(object, dest, value, kEmptyOrSmiOrNull); |
813 return StoreIntoObjectNoBarrier(object, dest, value, pp, kEmptyOrSmiOrNull); | |
814 } | 810 } |
815 | 811 |
816 // Stores a Smi value into a heap object field that always contains a Smi. | 812 // Stores a Smi value into a heap object field that always contains a Smi. |
817 void StoreIntoSmiField(const Address& dest, Register value); | 813 void StoreIntoSmiField(const Address& dest, Register value); |
818 void ZeroInitSmiField(const Address& dest); | 814 void ZeroInitSmiField(const Address& dest); |
819 // Increments a Smi field. Leaves flags in same state as an 'addq'. | 815 // Increments a Smi field. Leaves flags in same state as an 'addq'. |
820 void IncrementSmiField(const Address& dest, int64_t increment); | 816 void IncrementSmiField(const Address& dest, int64_t increment); |
821 | 817 |
822 void DoubleNegate(XmmRegister d); | 818 void DoubleNegate(XmmRegister d); |
823 void FloatNegate(XmmRegister f); | 819 void FloatNegate(XmmRegister f); |
(...skipping 23 matching lines...) Expand all Loading... |
847 // Call runtime function. Reserves shadow space on the stack before calling | 843 // Call runtime function. Reserves shadow space on the stack before calling |
848 // if platform ABI requires that. Does not restore RSP after the call itself. | 844 // if platform ABI requires that. Does not restore RSP after the call itself. |
849 void CallCFunction(const ExternalLabel* label); | 845 void CallCFunction(const ExternalLabel* label); |
850 void CallCFunction(Register reg); | 846 void CallCFunction(Register reg); |
851 | 847 |
852 /* | 848 /* |
853 * Loading and comparing classes of objects. | 849 * Loading and comparing classes of objects. |
854 */ | 850 */ |
855 void LoadClassId(Register result, Register object); | 851 void LoadClassId(Register result, Register object); |
856 | 852 |
857 void LoadClassById(Register result, Register class_id, Register pp); | 853 void LoadClassById(Register result, Register class_id); |
858 | 854 |
859 void LoadClass(Register result, Register object, Register pp); | 855 void LoadClass(Register result, Register object); |
860 | 856 |
861 void CompareClassId(Register object, intptr_t class_id); | 857 void CompareClassId(Register object, intptr_t class_id); |
862 | 858 |
863 void LoadClassIdMayBeSmi(Register result, Register object); | 859 void LoadClassIdMayBeSmi(Register result, Register object); |
864 void LoadTaggedClassIdMayBeSmi(Register result, Register object); | 860 void LoadTaggedClassIdMayBeSmi(Register result, Register object); |
865 | 861 |
866 // CheckClassIs fused with optimistic SmiUntag. | 862 // CheckClassIs fused with optimistic SmiUntag. |
867 // Value in the register object is untagged optimistically. | 863 // Value in the register object is untagged optimistically. |
868 void SmiUntagOrCheckClass(Register object, intptr_t class_id, Label* smi); | 864 void SmiUntagOrCheckClass(Register object, intptr_t class_id, Label* smi); |
869 | 865 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 ObjectPoolWrapper& object_pool_wrapper() { return object_pool_wrapper_; } | 912 ObjectPoolWrapper& object_pool_wrapper() { return object_pool_wrapper_; } |
917 | 913 |
918 RawObjectPool* MakeObjectPool() { | 914 RawObjectPool* MakeObjectPool() { |
919 return object_pool_wrapper_.MakeObjectPool(); | 915 return object_pool_wrapper_.MakeObjectPool(); |
920 } | 916 } |
921 | 917 |
922 void FinalizeInstructions(const MemoryRegion& region) { | 918 void FinalizeInstructions(const MemoryRegion& region) { |
923 buffer_.FinalizeInstructions(region); | 919 buffer_.FinalizeInstructions(region); |
924 } | 920 } |
925 | 921 |
926 void LoadPoolPointer(Register pp); | 922 void LoadPoolPointer(Register pp = PP); |
927 | 923 |
928 // Set up a Dart frame on entry with a frame pointer and PC information to | 924 // Set up a Dart frame on entry with a frame pointer and PC information to |
929 // enable easy access to the RawInstruction object of code corresponding | 925 // enable easy access to the RawInstruction object of code corresponding |
930 // to this frame. | 926 // to this frame. |
931 // The dart frame layout is as follows: | 927 // The dart frame layout is as follows: |
932 // .... | 928 // .... |
933 // locals space <=== RSP | 929 // locals space <=== RSP |
934 // saved PP | 930 // saved PP |
935 // pc (used to derive the RawInstruction Object of the dart code) | 931 // pc (used to derive the RawInstruction Object of the dart code) |
936 // saved RBP <=== RBP | 932 // saved RBP <=== RBP |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 // which will allocate in the runtime where tracing occurs. | 996 // which will allocate in the runtime where tracing occurs. |
1001 void MaybeTraceAllocation(intptr_t cid, | 997 void MaybeTraceAllocation(intptr_t cid, |
1002 Label* trace, | 998 Label* trace, |
1003 bool near_jump, | 999 bool near_jump, |
1004 bool inline_isolate = true); | 1000 bool inline_isolate = true); |
1005 | 1001 |
1006 // Inlined allocation of an instance of class 'cls', code has no runtime | 1002 // Inlined allocation of an instance of class 'cls', code has no runtime |
1007 // calls. Jump to 'failure' if the instance cannot be allocated here. | 1003 // calls. Jump to 'failure' if the instance cannot be allocated here. |
1008 // Allocated instance is returned in 'instance_reg'. | 1004 // Allocated instance is returned in 'instance_reg'. |
1009 // Only the tags field of the object is initialized. | 1005 // Only the tags field of the object is initialized. |
1010 // Loads large immediates from the object pool with pool pointer in PP if it | |
1011 // is not kNoRegister | |
1012 void TryAllocate(const Class& cls, | 1006 void TryAllocate(const Class& cls, |
1013 Label* failure, | 1007 Label* failure, |
1014 bool near_jump, | 1008 bool near_jump, |
1015 Register instance_reg, | 1009 Register instance_reg); |
1016 Register pp); | |
1017 | 1010 |
1018 void TryAllocateArray(intptr_t cid, | 1011 void TryAllocateArray(intptr_t cid, |
1019 intptr_t instance_size, | 1012 intptr_t instance_size, |
1020 Label* failure, | 1013 Label* failure, |
1021 bool near_jump, | 1014 bool near_jump, |
1022 Register instance, | 1015 Register instance, |
1023 Register end_address); | 1016 Register end_address); |
1024 | 1017 |
1025 // Debugging and bringup support. | 1018 // Debugging and bringup support. |
1026 void Stop(const char* message, bool fixed_length_encoding = false); | 1019 void Stop(const char* message, bool fixed_length_encoding = false); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 const String& comment_; | 1063 const String& comment_; |
1071 | 1064 |
1072 DISALLOW_COPY_AND_ASSIGN(CodeComment); | 1065 DISALLOW_COPY_AND_ASSIGN(CodeComment); |
1073 }; | 1066 }; |
1074 | 1067 |
1075 GrowableArray<CodeComment*> comments_; | 1068 GrowableArray<CodeComment*> comments_; |
1076 bool constant_pool_allowed_; | 1069 bool constant_pool_allowed_; |
1077 | 1070 |
1078 intptr_t FindImmediate(int64_t imm); | 1071 intptr_t FindImmediate(int64_t imm); |
1079 bool CanLoadFromObjectPool(const Object& object) const; | 1072 bool CanLoadFromObjectPool(const Object& object) const; |
1080 void LoadObjectHelper(Register dst, | 1073 void LoadObjectHelper(Register dst, const Object& obj, bool is_unique); |
1081 const Object& obj, | 1074 void LoadWordFromPoolOffset(Register dst, int32_t offset); |
1082 Register pp, | |
1083 bool is_unique); | |
1084 void LoadWordFromPoolOffset(Register dst, Register pp, int32_t offset); | |
1085 | 1075 |
1086 inline void EmitUint8(uint8_t value); | 1076 inline void EmitUint8(uint8_t value); |
1087 inline void EmitInt32(int32_t value); | 1077 inline void EmitInt32(int32_t value); |
1088 inline void EmitInt64(int64_t value); | 1078 inline void EmitInt64(int64_t value); |
1089 | 1079 |
1090 inline void EmitRegisterREX(Register reg, uint8_t rex); | 1080 inline void EmitRegisterREX(Register reg, uint8_t rex); |
1091 inline void EmitOperandREX(int rm, const Operand& operand, uint8_t rex); | 1081 inline void EmitOperandREX(int rm, const Operand& operand, uint8_t rex); |
1092 inline void EmitXmmRegisterOperand(int rm, XmmRegister reg); | 1082 inline void EmitXmmRegisterOperand(int rm, XmmRegister reg); |
1093 inline void EmitFixup(AssemblerFixup* fixup); | 1083 inline void EmitFixup(AssemblerFixup* fixup); |
1094 inline void EmitOperandSizeOverride(); | 1084 inline void EmitOperandSizeOverride(); |
(...skipping 30 matching lines...) Expand all Loading... |
1125 void VerifyObjectOrSmi(const Address& address); | 1115 void VerifyObjectOrSmi(const Address& address); |
1126 void VerifySmi(const Address& address, const char* stop_msg = "Expected Smi"); | 1116 void VerifySmi(const Address& address, const char* stop_msg = "Expected Smi"); |
1127 #endif // DEBUG | 1117 #endif // DEBUG |
1128 // Like VerifiedMemory::Verify(address, kWordSize) and ::Write, but also, | 1118 // Like VerifiedMemory::Verify(address, kWordSize) and ::Write, but also, |
1129 // in DEBUG mode, verifies that 'address' has content of type 'old_content'. | 1119 // in DEBUG mode, verifies that 'address' has content of type 'old_content'. |
1130 void VerifyHeapWord(const Address& address, FieldContent old_content); | 1120 void VerifyHeapWord(const Address& address, FieldContent old_content); |
1131 void VerifiedWrite(const Address& dest, | 1121 void VerifiedWrite(const Address& dest, |
1132 Register value, | 1122 Register value, |
1133 FieldContent old_content); | 1123 FieldContent old_content); |
1134 // Unaware of write barrier (use StoreInto* methods for storing to objects). | 1124 // Unaware of write barrier (use StoreInto* methods for storing to objects). |
1135 void MoveImmediate(const Address& dst, const Immediate& imm, Register pp); | 1125 void MoveImmediate(const Address& dst, const Immediate& imm); |
1136 | 1126 |
1137 void ComputeCounterAddressesForCid(intptr_t cid, | 1127 void ComputeCounterAddressesForCid(intptr_t cid, |
1138 Heap::Space space, | 1128 Heap::Space space, |
1139 Address* count_address, | 1129 Address* count_address, |
1140 Address* size_address); | 1130 Address* size_address); |
1141 DISALLOW_ALLOCATION(); | 1131 DISALLOW_ALLOCATION(); |
1142 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1132 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1143 }; | 1133 }; |
1144 | 1134 |
1145 | 1135 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 } | 1204 } |
1215 | 1205 |
1216 | 1206 |
1217 inline void Assembler::EmitOperandSizeOverride() { | 1207 inline void Assembler::EmitOperandSizeOverride() { |
1218 EmitUint8(0x66); | 1208 EmitUint8(0x66); |
1219 } | 1209 } |
1220 | 1210 |
1221 } // namespace dart | 1211 } // namespace dart |
1222 | 1212 |
1223 #endif // VM_ASSEMBLER_X64_H_ | 1213 #endif // VM_ASSEMBLER_X64_H_ |
OLD | NEW |