v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
push_registers_asm.cc
Go to the documentation of this file.
1
// Copyright 2020 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Push all callee-saved registers to get them on the stack for conservative
6
// stack scanning.
7
8
// See asm/x64/push_registers_clang.cc for why the function is not generated
9
// using clang.
10
11
// Do not depend on V8_TARGET_OS_* defines as some embedders may override the
12
// GN toolchain (e.g. ChromeOS) and not provide them.
13
14
// S390 ABI source:
15
// http://refspecs.linuxbase.org/ELF/zSeries/lzsabi0_zSeries.html
16
asm
(
".text \n"
17
".align 8 \n"
18
".globl PushAllRegistersAndIterateStack \n"
19
".type PushAllRegistersAndIterateStack, %function \n"
20
".hidden PushAllRegistersAndIterateStack \n"
21
"PushAllRegistersAndIterateStack: \n"
22
// Push all callee-saved registers.
23
// r6-r13, r14 and sp(r15)
24
" stmg %r6, %sp, 48(%sp) \n"
25
// Allocate frame.
26
" lay %sp, -160(%sp) \n"
27
// Pass 1st parameter (r2) unchanged (Stack*).
28
// Pass 2nd parameter (r3) unchanged (StackVisitor*).
29
// Save 3rd parameter (r4; IterateStackCallback).
30
" lgr %r5, %r4 \n"
31
// Pass sp as 3rd parameter. 160+48 to point
32
// to callee saved region stored above.
33
" lay %r4, 208(%sp) \n"
34
// Call the callback.
35
" basr %r14, %r5 \n"
36
" lmg %r14,%sp, 272(%sp) \n"
37
" br %r14 \n"
);
src
heap
base
asm
s390
push_registers_asm.cc
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0