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-exception
5 #include "../assembly.h"
8 // This routine is VE specific
9 // https://www.nec.com/en/global/prod/hpc/aurora/document/VE-ABI_v1.1.pdf
11 // destroy %s62 and %s63 only
17 DEFINE_COMPILERRT_FUNCTION(__ve_grow_stack)
18 subu.l %sp, %sp, %s0 # sp -= alloca size
19 and %sp, -16, %sp # align sp
21 ld %s63, 0x18(,%tp) # load param area
22 lea %s62, 0x13b # syscall # of grow
23 shm.l %s62, 0x0(%s63) # stored at addr:0
24 shm.l %sl, 0x8(%s63) # old limit at addr:8
25 shm.l %sp, 0x10(%s63) # new limit at addr:16
29 END_COMPILERRT_FUNCTION(__ve_grow_stack)