From a7d3f6933ddbbd1c0b20529a0734ed66f98d75a0 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Mon, 25 Nov 2019 18:48:47 +0100 Subject: [SystemZ] Return the right offsets from getCalleeSavedSpillSlots(). // Due to the SystemZ ABI, the DWARF CFA (Canonical Frame Address) is not // equal to the incoming stack pointer, but to incoming stack pointer plus // 160. The getOffsetOfLocalArea() returned value is interpreted as "the // offset of the local area from the CFA". The immediate offsets into the Register save area returned by getCalleeSavedSpillSlots() should take this offset into account, which this patch makes sure of. Patch and review by Ulrich Weigand. https://reviews.llvm.org/D70427 --- llvm/test/CodeGen/SystemZ/anyregcc-novec.ll | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'llvm/test/CodeGen/SystemZ/anyregcc-novec.ll') diff --git a/llvm/test/CodeGen/SystemZ/anyregcc-novec.ll b/llvm/test/CodeGen/SystemZ/anyregcc-novec.ll index 72bf00c2265..f7e2af91792 100644 --- a/llvm/test/CodeGen/SystemZ/anyregcc-novec.ll +++ b/llvm/test/CodeGen/SystemZ/anyregcc-novec.ll @@ -5,13 +5,14 @@ define anyregcc void @anyregcc1() { entry: ;CHECK-LABEL: anyregcc1 ;CHECK: stmg %r2, %r15, 16(%r15) -;CHECK: std %f0, +;CHECK: aghi %r15, -256 +;CHECK: std %f0, 384(%r15) ;CHECK: std %f1, -;CHECK: std %f2, +;CHECK: std %f2, 392(%r15) ;CHECK: std %f3, -;CHECK: std %f4, +;CHECK: std %f4, 400(%r15) ;CHECK: std %f5, -;CHECK: std %f6, +;CHECK: std %f6, 408(%r15) ;CHECK: std %f7, ;CHECK: std %f8, ;CHECK: std %f9, @@ -21,6 +22,14 @@ entry: ;CHECK: std %f13, ;CHECK: std %f14, ;CHECK: std %f15, +;CHECK: .cfi_offset %f0, -32 +;CHECK: .cfi_offset %f2, -24 +;CHECK: .cfi_offset %f4, -16 +;CHECK: .cfi_offset %f6, -8 +;CHECK: ld %f0, 384(%r15) +;CHECK: ld %f2, 392(%r15) +;CHECK: ld %f4, 400(%r15) +;CHECK: ld %f6, 408(%r15) call void asm sideeffect "", "~{r0},~{r1},~{r2},~{r3},~{r4},~{r5},~{r6},~{r7},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{f0},~{f1},~{f2},~{f3},~{f4},~{f5},~{f6},~{f7},~{f8},~{f9},~{f10},~{f11},~{f12},~{f13},~{f14},~{f15}"() nounwind ret void } -- cgit v1.2.3