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

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

Issue 967323002: Refactor BreakLocationIterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: static_cast instead Created 5 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
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/assembler-arm64-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following 10 // copyright notice, this list of conditions and the following
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 return false; 181 return false;
182 } 182 }
183 183
184 184
185 bool RelocInfo::IsInConstantPool() { 185 bool RelocInfo::IsInConstantPool() {
186 Instruction* instr = reinterpret_cast<Instruction*>(pc_); 186 Instruction* instr = reinterpret_cast<Instruction*>(pc_);
187 return instr->IsLdrLiteralX(); 187 return instr->IsLdrLiteralX();
188 } 188 }
189 189
190 190
191 void RelocInfo::PatchCode(byte* instructions, int instruction_count) {
192 // Patch the code at the current address with the supplied instructions.
193 Instr* pc = reinterpret_cast<Instr*>(pc_);
194 Instr* instr = reinterpret_cast<Instr*>(instructions);
195 for (int i = 0; i < instruction_count; i++) {
196 *(pc + i) = *(instr + i);
197 }
198
199 // Indicate that code has changed.
200 CpuFeatures::FlushICache(pc_, instruction_count * kInstructionSize);
201 }
202
203
204 // Patch the code at the current PC with a call to the target address.
205 // Additional guard instructions can be added if required.
206 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) {
207 UNIMPLEMENTED();
208 }
209
210
211 Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2, 191 Register GetAllocatableRegisterThatIsNotOneOf(Register reg1, Register reg2,
212 Register reg3, Register reg4) { 192 Register reg3, Register reg4) {
213 CPURegList regs(reg1, reg2, reg3, reg4); 193 CPURegList regs(reg1, reg2, reg3, reg4);
214 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) { 194 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) {
215 Register candidate = Register::FromAllocationIndex(i); 195 Register candidate = Register::FromAllocationIndex(i);
216 if (regs.IncludesAliasOf(candidate)) continue; 196 if (regs.IncludesAliasOf(candidate)) continue;
217 return candidate; 197 return candidate;
218 } 198 }
219 UNREACHABLE(); 199 UNREACHABLE();
220 return NoReg; 200 return NoReg;
(...skipping 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); 3107 movz(scratch, (target_offset >> 16) & 0xFFFF, 16);
3128 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); 3108 movk(scratch, (target_offset >> 32) & 0xFFFF, 32);
3129 DCHECK((target_offset >> 48) == 0); 3109 DCHECK((target_offset >> 48) == 0);
3130 add(rd, rd, scratch); 3110 add(rd, rd, scratch);
3131 } 3111 }
3132 3112
3133 3113
3134 } } // namespace v8::internal 3114 } } // namespace v8::internal
3135 3115
3136 #endif // V8_TARGET_ARCH_ARM64 3116 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/arm64/assembler-arm64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698