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

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

Issue 660256: Move definitions of named registers as constant structures to assembler-arm.h... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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/arm/assembler-arm.h ('k') | no next file » | 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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 if (OS::ArmCpuHasFeature(ARMv7)) { 75 if (OS::ArmCpuHasFeature(ARMv7)) {
76 supported_ |= 1u << ARMv7; 76 supported_ |= 1u << ARMv7;
77 found_by_runtime_probing_ |= 1u << ARMv7; 77 found_by_runtime_probing_ |= 1u << ARMv7;
78 } 78 }
79 #endif 79 #endif
80 } 80 }
81 81
82 82
83 // ----------------------------------------------------------------------------- 83 // -----------------------------------------------------------------------------
84 // Implementation of Register and CRegister
85
86 Register no_reg = { -1 };
87
88 Register r0 = { 0 };
89 Register r1 = { 1 };
90 Register r2 = { 2 };
91 Register r3 = { 3 };
92 Register r4 = { 4 };
93 Register r5 = { 5 };
94 Register r6 = { 6 };
95 Register r7 = { 7 };
96 Register r8 = { 8 }; // Used as context register.
97 Register r9 = { 9 };
98 Register r10 = { 10 }; // Used as roots register.
99 Register fp = { 11 };
100 Register ip = { 12 };
101 Register sp = { 13 };
102 Register lr = { 14 };
103 Register pc = { 15 };
104
105
106 CRegister no_creg = { -1 };
107
108 CRegister cr0 = { 0 };
109 CRegister cr1 = { 1 };
110 CRegister cr2 = { 2 };
111 CRegister cr3 = { 3 };
112 CRegister cr4 = { 4 };
113 CRegister cr5 = { 5 };
114 CRegister cr6 = { 6 };
115 CRegister cr7 = { 7 };
116 CRegister cr8 = { 8 };
117 CRegister cr9 = { 9 };
118 CRegister cr10 = { 10 };
119 CRegister cr11 = { 11 };
120 CRegister cr12 = { 12 };
121 CRegister cr13 = { 13 };
122 CRegister cr14 = { 14 };
123 CRegister cr15 = { 15 };
124
125 // Support for the VFP registers s0 to s31 (d0 to d15).
126 // Note that "sN:sM" is the same as "dN/2".
127 SwVfpRegister s0 = { 0 };
128 SwVfpRegister s1 = { 1 };
129 SwVfpRegister s2 = { 2 };
130 SwVfpRegister s3 = { 3 };
131 SwVfpRegister s4 = { 4 };
132 SwVfpRegister s5 = { 5 };
133 SwVfpRegister s6 = { 6 };
134 SwVfpRegister s7 = { 7 };
135 SwVfpRegister s8 = { 8 };
136 SwVfpRegister s9 = { 9 };
137 SwVfpRegister s10 = { 10 };
138 SwVfpRegister s11 = { 11 };
139 SwVfpRegister s12 = { 12 };
140 SwVfpRegister s13 = { 13 };
141 SwVfpRegister s14 = { 14 };
142 SwVfpRegister s15 = { 15 };
143 SwVfpRegister s16 = { 16 };
144 SwVfpRegister s17 = { 17 };
145 SwVfpRegister s18 = { 18 };
146 SwVfpRegister s19 = { 19 };
147 SwVfpRegister s20 = { 20 };
148 SwVfpRegister s21 = { 21 };
149 SwVfpRegister s22 = { 22 };
150 SwVfpRegister s23 = { 23 };
151 SwVfpRegister s24 = { 24 };
152 SwVfpRegister s25 = { 25 };
153 SwVfpRegister s26 = { 26 };
154 SwVfpRegister s27 = { 27 };
155 SwVfpRegister s28 = { 28 };
156 SwVfpRegister s29 = { 29 };
157 SwVfpRegister s30 = { 30 };
158 SwVfpRegister s31 = { 31 };
159
160 DwVfpRegister d0 = { 0 };
161 DwVfpRegister d1 = { 1 };
162 DwVfpRegister d2 = { 2 };
163 DwVfpRegister d3 = { 3 };
164 DwVfpRegister d4 = { 4 };
165 DwVfpRegister d5 = { 5 };
166 DwVfpRegister d6 = { 6 };
167 DwVfpRegister d7 = { 7 };
168 DwVfpRegister d8 = { 8 };
169 DwVfpRegister d9 = { 9 };
170 DwVfpRegister d10 = { 10 };
171 DwVfpRegister d11 = { 11 };
172 DwVfpRegister d12 = { 12 };
173 DwVfpRegister d13 = { 13 };
174 DwVfpRegister d14 = { 14 };
175 DwVfpRegister d15 = { 15 };
176
177 // -----------------------------------------------------------------------------
178 // Implementation of RelocInfo 84 // Implementation of RelocInfo
179 85
180 const int RelocInfo::kApplyMask = 0; 86 const int RelocInfo::kApplyMask = 0;
181 87
182 88
183 void RelocInfo::PatchCode(byte* instructions, int instruction_count) { 89 void RelocInfo::PatchCode(byte* instructions, int instruction_count) {
184 // Patch the code at the current address with the supplied instructions. 90 // Patch the code at the current address with the supplied instructions.
185 Instr* pc = reinterpret_cast<Instr*>(pc_); 91 Instr* pc = reinterpret_cast<Instr*>(pc_);
186 Instr* instr = reinterpret_cast<Instr*>(instructions); 92 Instr* instr = reinterpret_cast<Instr*>(instructions);
187 for (int i = 0; i < instruction_count; i++) { 93 for (int i = 0; i < instruction_count; i++) {
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 bind(&after_pool); 1775 bind(&after_pool);
1870 } 1776 }
1871 1777
1872 // Since a constant pool was just emitted, move the check offset forward by 1778 // Since a constant pool was just emitted, move the check offset forward by
1873 // the standard interval. 1779 // the standard interval.
1874 next_buffer_check_ = pc_offset() + kCheckConstInterval; 1780 next_buffer_check_ = pc_offset() + kCheckConstInterval;
1875 } 1781 }
1876 1782
1877 1783
1878 } } // namespace v8::internal 1784 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698