xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/Windows/chkstk.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -verify-machineinstrs %s -o - \
2*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck -check-prefix CHECK-DEFAULT-CODE-MODEL %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -code-model=large -verify-machineinstrs %s -o - \
5*9880d681SAndroid Build Coastguard Worker; RUN:  | FileCheck -check-prefix CHECK-LARGE-CODE-MODEL %s
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine arm_aapcs_vfpcc void @check_watermark() {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  %buffer = alloca [4096 x i8], align 1
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK-DEFAULT-CODE-MODEL: check_watermark:
14*9880d681SAndroid Build Coastguard Worker; CHECK-DEFAULT-CODE-MODEL: 	movw r4, #1024
15*9880d681SAndroid Build Coastguard Worker; CHECK-DEFAULT-CODE-MODEL: 	bl __chkstk
16*9880d681SAndroid Build Coastguard Worker; CHECK-DEFAULT-CODE-MODEL: 	sub.w sp, sp, r4
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: check_watermark:
19*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: 	movw r12, :lower16:__chkstk
20*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: 	movt r12, :upper16:__chkstk
21*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: 	movw r4, #1024
22*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: 	blx r12
23*9880d681SAndroid Build Coastguard Worker; CHECK-LARGE-CODE-MODEL: 	sub.w sp, sp, r4
24*9880d681SAndroid Build Coastguard Worker
25