| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| 11 // with the distribution. | 11 // with the distribution. |
| 12 // * Neither the name of Google Inc. nor the names of its | 12 // * Neither the name of Google Inc. nor the names of its |
| 13 // contributors may be used to endorse or promote products derived | 13 // contributors may be used to endorse or promote products derived |
| 14 // from this software without specific prior written permission. | 14 // from this software without specific prior written permission. |
| 15 // | 15 // |
| 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #if V8_TARGET_ARCH_A64 | 30 #if V8_TARGET_ARCH_ARM64 |
| 31 | 31 |
| 32 #include "codegen.h" | 32 #include "codegen.h" |
| 33 #include "debug.h" | 33 #include "debug.h" |
| 34 | 34 |
| 35 namespace v8 { | 35 namespace v8 { |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 38 | 38 |
| 39 #define __ ACCESS_MASM(masm) | 39 #define __ ACCESS_MASM(masm) |
| 40 | 40 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 308 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
| 309 // In places other than IC call sites it is expected that r0 is TOS which | 309 // In places other than IC call sites it is expected that r0 is TOS which |
| 310 // is an object - this is not generally the case so this should be used with | 310 // is an object - this is not generally the case so this should be used with |
| 311 // care. | 311 // care. |
| 312 Generate_DebugBreakCallHelper(masm, x0.Bit(), 0, x10); | 312 Generate_DebugBreakCallHelper(masm, x0.Bit(), 0, x10); |
| 313 } | 313 } |
| 314 | 314 |
| 315 | 315 |
| 316 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 316 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
| 317 // Register state for CallFunctionStub (from code-stubs-a64.cc). | 317 // Register state for CallFunctionStub (from code-stubs-arm64.cc). |
| 318 // ----------- S t a t e ------------- | 318 // ----------- S t a t e ------------- |
| 319 // -- x1 : function | 319 // -- x1 : function |
| 320 // ----------------------------------- | 320 // ----------------------------------- |
| 321 Generate_DebugBreakCallHelper(masm, x1.Bit(), 0, x10); | 321 Generate_DebugBreakCallHelper(masm, x1.Bit(), 0, x10); |
| 322 } | 322 } |
| 323 | 323 |
| 324 | 324 |
| 325 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { | 325 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { |
| 326 // Register state for CallFunctionStub (from code-stubs-a64.cc). | 326 // Register state for CallFunctionStub (from code-stubs-arm64.cc). |
| 327 // ----------- S t a t e ------------- | 327 // ----------- S t a t e ------------- |
| 328 // -- x1 : function | 328 // -- x1 : function |
| 329 // -- x2 : feedback array | 329 // -- x2 : feedback array |
| 330 // -- x3 : slot in feedback array | 330 // -- x3 : slot in feedback array |
| 331 // ----------------------------------- | 331 // ----------------------------------- |
| 332 Generate_DebugBreakCallHelper(masm, x1.Bit() | x2.Bit() | x3.Bit(), 0, x10); | 332 Generate_DebugBreakCallHelper(masm, x1.Bit() | x2.Bit() | x3.Bit(), 0, x10); |
| 333 } | 333 } |
| 334 | 334 |
| 335 | 335 |
| 336 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { | 336 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
| 337 // Calling convention for CallConstructStub (from code-stubs-a64.cc). | 337 // Calling convention for CallConstructStub (from code-stubs-arm64.cc). |
| 338 // ----------- S t a t e ------------- | 338 // ----------- S t a t e ------------- |
| 339 // -- x0 : number of arguments (not smi) | 339 // -- x0 : number of arguments (not smi) |
| 340 // -- x1 : constructor function | 340 // -- x1 : constructor function |
| 341 // ----------------------------------- | 341 // ----------------------------------- |
| 342 Generate_DebugBreakCallHelper(masm, x1.Bit(), x0.Bit(), x10); | 342 Generate_DebugBreakCallHelper(masm, x1.Bit(), x0.Bit(), x10); |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { | 346 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { |
| 347 // Calling convention for CallConstructStub (from code-stubs-a64.cc). | 347 // Calling convention for CallConstructStub (from code-stubs-arm64.cc). |
| 348 // ----------- S t a t e ------------- | 348 // ----------- S t a t e ------------- |
| 349 // -- x0 : number of arguments (not smi) | 349 // -- x0 : number of arguments (not smi) |
| 350 // -- x1 : constructor function | 350 // -- x1 : constructor function |
| 351 // -- x2 : feedback array | 351 // -- x2 : feedback array |
| 352 // -- x3 : feedback slot (smi) | 352 // -- x3 : feedback slot (smi) |
| 353 // ----------------------------------- | 353 // ----------------------------------- |
| 354 Generate_DebugBreakCallHelper( | 354 Generate_DebugBreakCallHelper( |
| 355 masm, x1.Bit() | x2.Bit() | x3.Bit(), x0.Bit(), x10); | 355 masm, x1.Bit() | x2.Bit() | x3.Bit(), x0.Bit(), x10); |
| 356 } | 356 } |
| 357 | 357 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 369 | 369 |
| 370 | 370 |
| 371 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) { | 371 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) { |
| 372 // In the places where a debug break slot is inserted no registers can contain | 372 // In the places where a debug break slot is inserted no registers can contain |
| 373 // object pointers. | 373 // object pointers. |
| 374 Generate_DebugBreakCallHelper(masm, 0, 0, x10); | 374 Generate_DebugBreakCallHelper(masm, 0, 0, x10); |
| 375 } | 375 } |
| 376 | 376 |
| 377 | 377 |
| 378 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { | 378 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { |
| 379 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnA64); | 379 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnARM64); |
| 380 } | 380 } |
| 381 | 381 |
| 382 | 382 |
| 383 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 383 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 384 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnA64); | 384 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnARM64); |
| 385 } | 385 } |
| 386 | 386 |
| 387 const bool Debug::kFrameDropperSupported = false; | 387 const bool Debug::kFrameDropperSupported = false; |
| 388 | 388 |
| 389 #endif // ENABLE_DEBUGGER_SUPPORT | 389 #endif // ENABLE_DEBUGGER_SUPPORT |
| 390 | 390 |
| 391 } } // namespace v8::internal | 391 } } // namespace v8::internal |
| 392 | 392 |
| 393 #endif // V8_TARGET_ARCH_A64 | 393 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |