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

Side by Side Diff: src/ia32/assembler-ia32.h

Issue 6928060: Merge Label and NearLabel (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments 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/assembler.h ('k') | src/ia32/assembler-ia32.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) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 // Label L; // unbound label 835 // Label L; // unbound label
836 // j(cc, &L); // forward branch to unbound label 836 // j(cc, &L); // forward branch to unbound label
837 // bind(&L); // bind label to the current pc 837 // bind(&L); // bind label to the current pc
838 // j(cc, &L); // backward branch to bound label 838 // j(cc, &L); // backward branch to bound label
839 // bind(&L); // illegal: a label may be bound only once 839 // bind(&L); // illegal: a label may be bound only once
840 // 840 //
841 // Note: The same Label can be used for forward and backward branches 841 // Note: The same Label can be used for forward and backward branches
842 // but it may be bound only once. 842 // but it may be bound only once.
843 843
844 void bind(Label* L); // binds an unbound label L to the current code position 844 void bind(Label* L); // binds an unbound label L to the current code position
845 // DEPRECATED. Use bind(Label*) with jmp(Label*, Label::kNear) instead.
845 void bind(NearLabel* L); 846 void bind(NearLabel* L);
846 847
847 // Calls 848 // Calls
848 void call(Label* L); 849 void call(Label* L);
849 void call(byte* entry, RelocInfo::Mode rmode); 850 void call(byte* entry, RelocInfo::Mode rmode);
850 int CallSize(const Operand& adr); 851 int CallSize(const Operand& adr);
851 void call(const Operand& adr); 852 void call(const Operand& adr);
852 int CallSize(Handle<Code> code, RelocInfo::Mode mode); 853 int CallSize(Handle<Code> code, RelocInfo::Mode mode);
853 void call(Handle<Code> code, 854 void call(Handle<Code> code,
854 RelocInfo::Mode rmode, 855 RelocInfo::Mode rmode,
855 unsigned ast_id = kNoASTId); 856 unsigned ast_id = kNoASTId);
856 857
857 // Jumps 858 // Jumps
858 void jmp(Label* L); // unconditional jump to L 859 // unconditional jump to L
860 void jmp(Label* L, Label::Distance distance = Label::kFar);
859 void jmp(byte* entry, RelocInfo::Mode rmode); 861 void jmp(byte* entry, RelocInfo::Mode rmode);
860 void jmp(const Operand& adr); 862 void jmp(const Operand& adr);
861 void jmp(Handle<Code> code, RelocInfo::Mode rmode); 863 void jmp(Handle<Code> code, RelocInfo::Mode rmode);
862 864
863 // Short jump 865 // Short jump
866 // DEPRECATED. Use jmp(Label*, Label::kNear) instead.
864 void jmp(NearLabel* L); 867 void jmp(NearLabel* L);
865 868
866 // Conditional jumps 869 // Conditional jumps
867 void j(Condition cc, Label* L, Hint hint = no_hint); 870 void j(Condition cc,
871 Label* L,
872 Hint hint,
873 Label::Distance distance = Label::kFar);
874 void j(Condition cc, Label* L, Label::Distance distance = Label::kFar) {
875 j(cc, L, no_hint, distance);
876 }
868 void j(Condition cc, byte* entry, RelocInfo::Mode rmode, Hint hint = no_hint); 877 void j(Condition cc, byte* entry, RelocInfo::Mode rmode, Hint hint = no_hint);
869 void j(Condition cc, Handle<Code> code, Hint hint = no_hint); 878 void j(Condition cc, Handle<Code> code, Hint hint = no_hint);
870 879
871 // Conditional short jump 880 // Conditional short jump
881 // DEPRECATED. Use j(Condition, Label*, Label::kNear) instead.
872 void j(Condition cc, NearLabel* L, Hint hint = no_hint); 882 void j(Condition cc, NearLabel* L, Hint hint = no_hint);
873 883
874 // Floating-point operations 884 // Floating-point operations
875 void fld(int i); 885 void fld(int i);
876 void fstp(int i); 886 void fstp(int i);
877 887
878 void fld1(); 888 void fld1();
879 void fldz(); 889 void fldz();
880 void fldpi(); 890 void fldpi();
881 void fldln2(); 891 void fldln2();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 void emit_farith(int b1, int b2, int i); 1108 void emit_farith(int b1, int b2, int i);
1099 1109
1100 // labels 1110 // labels
1101 void print(Label* L); 1111 void print(Label* L);
1102 void bind_to(Label* L, int pos); 1112 void bind_to(Label* L, int pos);
1103 1113
1104 // displacements 1114 // displacements
1105 inline Displacement disp_at(Label* L); 1115 inline Displacement disp_at(Label* L);
1106 inline void disp_at_put(Label* L, Displacement disp); 1116 inline void disp_at_put(Label* L, Displacement disp);
1107 inline void emit_disp(Label* L, Displacement::Type type); 1117 inline void emit_disp(Label* L, Displacement::Type type);
1118 inline void emit_near_disp(Label* L);
1108 1119
1109 // record reloc info for current pc_ 1120 // record reloc info for current pc_
1110 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 1121 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
1111 1122
1112 friend class CodePatcher; 1123 friend class CodePatcher;
1113 friend class EnsureSpace; 1124 friend class EnsureSpace;
1114 1125
1115 // Code buffer: 1126 // Code buffer:
1116 // The buffer into which code and relocation info are generated. 1127 // The buffer into which code and relocation info are generated.
1117 byte* buffer_; 1128 byte* buffer_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 private: 1168 private:
1158 Assembler* assembler_; 1169 Assembler* assembler_;
1159 #ifdef DEBUG 1170 #ifdef DEBUG
1160 int space_before_; 1171 int space_before_;
1161 #endif 1172 #endif
1162 }; 1173 };
1163 1174
1164 } } // namespace v8::internal 1175 } } // namespace v8::internal
1165 1176
1166 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1177 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698