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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 203263016: ARM: clean-up some stub call sequences. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 // To let the GC traverse the return address of the exit frames, we need to 1568 // To let the GC traverse the return address of the exit frames, we need to
1569 // know where the return address is. The CEntryStub is unmovable, so 1569 // know where the return address is. The CEntryStub is unmovable, so
1570 // we can store the address on the stack to be able to find it again and 1570 // we can store the address on the stack to be able to find it again and
1571 // we never have to restore it, because it will not change. 1571 // we never have to restore it, because it will not change.
1572 // Compute the return address in lr to return to after the jump below. Pc is 1572 // Compute the return address in lr to return to after the jump below. Pc is
1573 // already at '+ 8' from the current instruction but return is after three 1573 // already at '+ 8' from the current instruction but return is after three
1574 // instructions so add another 4 to pc to get the return address. 1574 // instructions so add another 4 to pc to get the return address.
1575 { 1575 {
1576 // Prevent literal pool emission before return address. 1576 // Prevent literal pool emission before return address.
1577 Assembler::BlockConstPoolScope block_const_pool(masm); 1577 Assembler::BlockConstPoolScope block_const_pool(masm);
1578 masm->add(lr, pc, Operand(4)); 1578 __ add(lr, pc, Operand(4));
1579 __ str(lr, MemOperand(sp, 0)); 1579 __ str(lr, MemOperand(sp, 0));
1580 masm->Jump(r5); 1580 __ Call(r5);
1581 } 1581 }
1582 1582
1583 __ VFPEnsureFPSCRState(r2); 1583 __ VFPEnsureFPSCRState(r2);
1584 1584
1585 if (always_allocate) { 1585 if (always_allocate) {
1586 // It's okay to clobber r2 and r3 here. Don't mess with r0 and r1 1586 // It's okay to clobber r2 and r3 here. Don't mess with r0 and r1
1587 // though (contain the result). 1587 // though (contain the result).
1588 __ mov(r2, Operand(scope_depth)); 1588 __ mov(r2, Operand(scope_depth));
1589 __ ldr(r3, MemOperand(r2)); 1589 __ ldr(r3, MemOperand(r2));
1590 __ sub(r3, r3, Operand(1)); 1590 __ sub(r3, r3, Operand(1));
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 // r4: argv 1858 // r4: argv
1859 if (is_construct) { 1859 if (is_construct) {
1860 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline, 1860 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
1861 isolate); 1861 isolate);
1862 __ mov(ip, Operand(construct_entry)); 1862 __ mov(ip, Operand(construct_entry));
1863 } else { 1863 } else {
1864 ExternalReference entry(Builtins::kJSEntryTrampoline, isolate); 1864 ExternalReference entry(Builtins::kJSEntryTrampoline, isolate);
1865 __ mov(ip, Operand(entry)); 1865 __ mov(ip, Operand(entry));
1866 } 1866 }
1867 __ ldr(ip, MemOperand(ip)); // deref address 1867 __ ldr(ip, MemOperand(ip)); // deref address
1868 __ add(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag));
1868 1869
1869 // Branch and link to JSEntryTrampoline. We don't use the double underscore 1870 // Branch and link to JSEntryTrampoline.
1870 // macro for the add instruction because we don't want the coverage tool 1871 __ Call(ip);
1871 // inserting instructions here after we read the pc. We block literal pool
1872 // emission for the same reason.
1873 {
1874 Assembler::BlockConstPoolScope block_const_pool(masm);
1875 __ mov(lr, Operand(pc));
1876 masm->add(pc, ip, Operand(Code::kHeaderSize - kHeapObjectTag));
1877 }
1878 1872
1879 // Unlink this frame from the handler chain. 1873 // Unlink this frame from the handler chain.
1880 __ PopTryHandler(); 1874 __ PopTryHandler();
1881 1875
1882 __ bind(&exit); // r0 holds result 1876 __ bind(&exit); // r0 holds result
1883 // Check if the current stack frame is marked as the outermost JS frame. 1877 // Check if the current stack frame is marked as the outermost JS frame.
1884 Label non_outermost_js_2; 1878 Label non_outermost_js_2;
1885 __ pop(r5); 1879 __ pop(r5);
1886 __ cmp(r5, Operand(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME))); 1880 __ cmp(r5, Operand(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)));
1887 __ b(ne, &non_outermost_js_2); 1881 __ b(ne, &non_outermost_js_2);
(...skipping 3613 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 MemOperand(fp, 6 * kPointerSize), 5495 MemOperand(fp, 6 * kPointerSize),
5502 NULL); 5496 NULL);
5503 } 5497 }
5504 5498
5505 5499
5506 #undef __ 5500 #undef __
5507 5501
5508 } } // namespace v8::internal 5502 } } // namespace v8::internal
5509 5503
5510 #endif // V8_TARGET_ARCH_ARM 5504 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698