brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 113110f Raw
74 lines · plain
1; Test the handling of GPR, FPR and stack arguments when no extension2; type is given.  This type of argument is used for passing structures, etc.3;4; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s -check-prefix=CHECK-INT5; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s -check-prefix=CHECK-FLOAT6; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s -check-prefix=CHECK-DOUBLE7; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s -check-prefix=CHECK-FP128-18; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s -check-prefix=CHECK-FP128-29; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s -check-prefix=CHECK-STACK10 11declare void @bar(i8, i16, i32, i64, float, double, fp128, i64,12                  float, double, i8, i16, i32, i64, float, double, fp128)13 14; There are two indirect fp128 slots, one at offset 224 (the first available15; byte after the outgoing arguments) and one immediately after it at 240.16; These slots should be set up outside the glued call sequence, so would17; normally use %f0/%f2 as the first available 128-bit pair.  This choice18; is hard-coded in the FP128 tests.19;20; The order of the CHECK-STACK stores doesn't matter.  It would be OK to reorder21; them in response to future code changes.22define void @foo() {23; CHECK-INT-LABEL: foo:24; CHECK-INT-DAG: lhi %r2, 125; CHECK-INT-DAG: lhi %r3, 226; CHECK-INT-DAG: lhi %r4, 327; CHECK-INT-DAG: lghi %r5, 428; CHECK-INT-DAG: la %r6, {{224|240}}(%r15)29; CHECK-INT: brasl %r14, bar@PLT30;31; CHECK-FLOAT-LABEL: foo:32; CHECK-FLOAT: lzer %f033; CHECK-FLOAT: lcdfr %f4, %f034; CHECK-FLOAT: brasl %r14, bar@PLT35;36; CHECK-DOUBLE-LABEL: foo:37; CHECK-DOUBLE: lzdr %f238; CHECK-DOUBLE: lcdfr %f6, %f239; CHECK-DOUBLE: brasl %r14, bar@PLT40;41; CHECK-FP128-1-LABEL: foo:42; CHECK-FP128-1: aghi %r15, -25643; CHECK-FP128-1: lzxr %f044; CHECK-FP128-1-DAG: std %f0, 224(%r15)45; CHECK-FP128-1-DAG: std %f2, 232(%r15)46; CHECK-FP128-1: brasl %r14, bar@PLT47;48; CHECK-FP128-2-LABEL: foo:49; CHECK-FP128-2: aghi %r15, -25650; CHECK-FP128-2: lzxr %f051; CHECK-FP128-2-DAG: std %f0, 240(%r15)52; CHECK-FP128-2-DAG: std %f2, 248(%r15)53; CHECK-FP128-2: brasl %r14, bar@PLT54;55; CHECK-STACK-LABEL: foo:56; CHECK-STACK: aghi %r15, -25657; CHECK-STACK: la [[REGISTER:%r[0-5]+]], {{224|240}}(%r15)58; CHECK-STACK: stg [[REGISTER]], 216(%r15)59; CHECK-STACK: mvghi 208(%r15), 060; CHECK-STACK: mvhi 204(%r15), 061; CHECK-STACK: mvghi 192(%r15), 962; CHECK-STACK: mvhi 188(%r15), 863; CHECK-STACK: mvhi 180(%r15), 764; CHECK-STACK: mvhi 172(%r15), 665; CHECK-STACK: mvghi 160(%r15), 566; CHECK-STACK: brasl %r14, bar@PLT67 68  call void @bar (i8 1, i16 2, i32 3, i64 4, float 0.0, double 0.0,69                  fp128 0xL00000000000000000000000000000000, i64 5,70                  float -0.0, double -0.0, i8 6, i16 7, i32 8, i64 9, float 0.0,71                  double 0.0, fp128 0xL00000000000000000000000000000000)72  ret void73}74