32 lines · plain
1// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.2// See https://llvm.org/LICENSE.txt for license information.3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception4 5#include "../assembly.h"6 7// grow_stack routine8// This routine is VE specific9// https://www.nec.com/en/global/prod/hpc/aurora/document/VE-ABI_v1.1.pdf10 11// destroy %s62 and %s63 only12 13#ifdef __ve__14 15.text16.p2align 417DEFINE_COMPILERRT_FUNCTION(__ve_grow_stack)18 subu.l %sp, %sp, %s0 # sp -= alloca size19 and %sp, -16, %sp # align sp20 brge.l.t %sp, %sl, 1f21 ld %s63, 0x18(,%tp) # load param area22 lea %s62, 0x13b # syscall # of grow23 shm.l %s62, 0x0(%s63) # stored at addr:024 shm.l %sl, 0x8(%s63) # old limit at addr:825 shm.l %sp, 0x10(%s63) # new limit at addr:1626 monc271:28 b.l (,%lr)29END_COMPILERRT_FUNCTION(__ve_grow_stack)30 31#endif // __ve__32