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 |
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 Check(ne, kOperandIsASmiAndNotAString); | 1614 Check(ne, kOperandIsASmiAndNotAString); |
1615 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); | 1615 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); |
1616 CompareInstanceType(temp, temp, FIRST_NONSTRING_TYPE); | 1616 CompareInstanceType(temp, temp, FIRST_NONSTRING_TYPE); |
1617 Check(lo, kOperandIsNotAString); | 1617 Check(lo, kOperandIsNotAString); |
1618 } | 1618 } |
1619 } | 1619 } |
1620 | 1620 |
1621 | 1621 |
1622 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { | 1622 void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id) { |
1623 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. | 1623 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. |
1624 Call(stub->GetCode(isolate()), RelocInfo::CODE_TARGET, ast_id); | 1624 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); |
1625 } | 1625 } |
1626 | 1626 |
1627 | 1627 |
1628 void MacroAssembler::TailCallStub(CodeStub* stub) { | 1628 void MacroAssembler::TailCallStub(CodeStub* stub) { |
1629 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); | 1629 Jump(stub->GetCode(), RelocInfo::CODE_TARGET); |
1630 } | 1630 } |
1631 | 1631 |
1632 | 1632 |
1633 void MacroAssembler::CallRuntime(const Runtime::Function* f, | 1633 void MacroAssembler::CallRuntime(const Runtime::Function* f, |
1634 int num_arguments, | 1634 int num_arguments, |
1635 SaveFPRegsMode save_doubles) { | 1635 SaveFPRegsMode save_doubles) { |
1636 // All arguments must be on the stack before this function is called. | 1636 // All arguments must be on the stack before this function is called. |
1637 // x0 holds the return value after the call. | 1637 // x0 holds the return value after the call. |
1638 | 1638 |
1639 // Check that the number of arguments matches what the function expects. | 1639 // Check that the number of arguments matches what the function expects. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 Mov(x1, ext); | 1814 Mov(x1, ext); |
1815 | 1815 |
1816 CEntryStub stub(isolate(), 1); | 1816 CEntryStub stub(isolate(), 1); |
1817 CallStub(&stub); | 1817 CallStub(&stub); |
1818 } | 1818 } |
1819 | 1819 |
1820 | 1820 |
1821 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { | 1821 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { |
1822 Mov(x1, builtin); | 1822 Mov(x1, builtin); |
1823 CEntryStub stub(isolate(), 1); | 1823 CEntryStub stub(isolate(), 1); |
1824 Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | 1824 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); |
1825 } | 1825 } |
1826 | 1826 |
1827 | 1827 |
1828 void MacroAssembler::GetBuiltinFunction(Register target, | 1828 void MacroAssembler::GetBuiltinFunction(Register target, |
1829 Builtins::JavaScript id) { | 1829 Builtins::JavaScript id) { |
1830 // Load the builtins object into target register. | 1830 // Load the builtins object into target register. |
1831 Ldr(target, GlobalObjectMemOperand()); | 1831 Ldr(target, GlobalObjectMemOperand()); |
1832 Ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset)); | 1832 Ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset)); |
1833 // Load the JavaScript builtin function from the builtins object. | 1833 // Load the JavaScript builtin function from the builtins object. |
1834 Ldr(target, FieldMemOperand(target, | 1834 Ldr(target, FieldMemOperand(target, |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3185 } | 3185 } |
3186 } | 3186 } |
3187 | 3187 |
3188 | 3188 |
3189 #ifdef ENABLE_DEBUGGER_SUPPORT | 3189 #ifdef ENABLE_DEBUGGER_SUPPORT |
3190 void MacroAssembler::DebugBreak() { | 3190 void MacroAssembler::DebugBreak() { |
3191 Mov(x0, 0); | 3191 Mov(x0, 0); |
3192 Mov(x1, ExternalReference(Runtime::kDebugBreak, isolate())); | 3192 Mov(x1, ExternalReference(Runtime::kDebugBreak, isolate())); |
3193 CEntryStub ces(isolate(), 1); | 3193 CEntryStub ces(isolate(), 1); |
3194 ASSERT(AllowThisStubCall(&ces)); | 3194 ASSERT(AllowThisStubCall(&ces)); |
3195 Call(ces.GetCode(isolate()), RelocInfo::DEBUG_BREAK); | 3195 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); |
3196 } | 3196 } |
3197 #endif | 3197 #endif |
3198 | 3198 |
3199 | 3199 |
3200 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, | 3200 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, |
3201 int handler_index) { | 3201 int handler_index) { |
3202 ASSERT(jssp.Is(StackPointer())); | 3202 ASSERT(jssp.Is(StackPointer())); |
3203 // Adjust this code if the asserts don't hold. | 3203 // Adjust this code if the asserts don't hold. |
3204 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); | 3204 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); |
3205 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); | 3205 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); |
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5244 } | 5244 } |
5245 } | 5245 } |
5246 | 5246 |
5247 | 5247 |
5248 #undef __ | 5248 #undef __ |
5249 | 5249 |
5250 | 5250 |
5251 } } // namespace v8::internal | 5251 } } // namespace v8::internal |
5252 | 5252 |
5253 #endif // V8_TARGET_ARCH_ARM64 | 5253 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |