| OLD | NEW |
| 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 2228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2239 const char pad[] = {'\0', '\0', '\0', '\0'}; | 2239 const char pad[] = {'\0', '\0', '\0', '\0'}; |
| 2240 STATIC_ASSERT(sizeof(pad) == kInstructionSize); | 2240 STATIC_ASSERT(sizeof(pad) == kInstructionSize); |
| 2241 EmitData(pad, RoundUp(pc_offset(), kInstructionSize) - pc_offset()); | 2241 EmitData(pad, RoundUp(pc_offset(), kInstructionSize) - pc_offset()); |
| 2242 } | 2242 } |
| 2243 | 2243 |
| 2244 | 2244 |
| 2245 void Assembler::debug(const char* message, uint32_t code, Instr params) { | 2245 void Assembler::debug(const char* message, uint32_t code, Instr params) { |
| 2246 #ifdef USE_SIMULATOR | 2246 #ifdef USE_SIMULATOR |
| 2247 // Don't generate simulator specific code if we are building a snapshot, which | 2247 // Don't generate simulator specific code if we are building a snapshot, which |
| 2248 // might be run on real hardware. | 2248 // might be run on real hardware. |
| 2249 // if (!serializer_enabled()) { | 2249 if (!serializer_enabled()) { |
| 2250 // The arguments to the debug marker need to be contiguous in memory, so | 2250 // The arguments to the debug marker need to be contiguous in memory, so |
| 2251 // make sure we don't try to emit pools. | 2251 // make sure we don't try to emit pools. |
| 2252 BlockPoolsScope scope(this); | 2252 BlockPoolsScope scope(this); |
| 2253 | 2253 |
| 2254 Label start; | 2254 Label start; |
| 2255 bind(&start); | 2255 bind(&start); |
| 2256 | 2256 |
| 2257 // Refer to instructions-arm64.h for a description of the marker and its | 2257 // Refer to instructions-arm64.h for a description of the marker and its |
| 2258 // arguments. | 2258 // arguments. |
| 2259 hlt(kImmExceptionIsDebug); | 2259 hlt(kImmExceptionIsDebug); |
| 2260 DCHECK(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset); | 2260 DCHECK(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset); |
| 2261 dc32(code); | 2261 dc32(code); |
| 2262 DCHECK(SizeOfCodeGeneratedSince(&start) == kDebugParamsOffset); | 2262 DCHECK(SizeOfCodeGeneratedSince(&start) == kDebugParamsOffset); |
| 2263 dc32(params); | 2263 dc32(params); |
| 2264 DCHECK(SizeOfCodeGeneratedSince(&start) == kDebugMessageOffset); | 2264 DCHECK(SizeOfCodeGeneratedSince(&start) == kDebugMessageOffset); |
| 2265 EmitStringData(message); | 2265 EmitStringData(message); |
| 2266 hlt(kImmExceptionIsUnreachable); | 2266 hlt(kImmExceptionIsUnreachable); |
| 2267 | 2267 |
| 2268 return; | 2268 return; |
| 2269 // } | 2269 } |
| 2270 // Fall through if Serializer is enabled. | 2270 // Fall through if Serializer is enabled. |
| 2271 #endif | 2271 #endif |
| 2272 | 2272 |
| 2273 if (params & BREAK) { | 2273 if (params & BREAK) { |
| 2274 hlt(kImmExceptionIsDebug); | 2274 hlt(kImmExceptionIsDebug); |
| 2275 } | 2275 } |
| 2276 } | 2276 } |
| 2277 | 2277 |
| 2278 | 2278 |
| 2279 void Assembler::Logical(const Register& rd, | 2279 void Assembler::Logical(const Register& rd, |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3139 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3139 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3140 DCHECK((target_offset >> 48) == 0); | 3140 DCHECK((target_offset >> 48) == 0); |
| 3141 add(rd, rd, scratch); | 3141 add(rd, rd, scratch); |
| 3142 } | 3142 } |
| 3143 | 3143 |
| 3144 | 3144 |
| 3145 } // namespace internal | 3145 } // namespace internal |
| 3146 } // namespace v8 | 3146 } // namespace v8 |
| 3147 | 3147 |
| 3148 #endif // V8_TARGET_ARCH_ARM64 | 3148 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |