aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/arm-abi-attr.ll
blob: f3923ae5cc82bc96264ae1e2499972851577c089 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
; RUN: llc -mtriple=arm-linux < %s | FileCheck %s --check-prefix=APCS
; RUN: llc -mtriple=arm-linux -mattr=apcs < %s | \
; RUN: FileCheck %s --check-prefix=APCS
; RUN: llc -mtriple=arm-linux-gnueabi -mattr=apcs < %s | \
; RUN: FileCheck %s --check-prefix=APCS

; RUN: llc -mtriple=arm-linux-gnueabi < %s | FileCheck %s --check-prefix=AAPCS
; RUN: llc -mtriple=arm-linux-gnueabi -mattr=aapcs < %s | \
; RUN: FileCheck %s --check-prefix=AAPCS
; RUN: llc -mtriple=arm-linux-gnu -mattr=aapcs < %s | \
; RUN: FileCheck %s --check-prefix=AAPCS

; The stack is 8 byte aligned on AAPCS and 4 on APCS, so we should get a BIC
; only on APCS.

define void @g() {
; APCS: sub	sp, sp, #8
; APCS: bic	sp, sp, #7

; AAPCS: sub	sp, sp, #8
; AAPCS-NOT: bic

  %c = alloca i8, align 8
  call void @f(i8* %c)
  ret void
}

declare void @f(i8*)