From patchwork Mon Mar 7 11:51:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 403 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:42:21 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs96150qah; Mon, 7 Mar 2011 03:51:54 -0800 (PST) Received: by 10.224.74.14 with SMTP id s14mr2977653qaj.191.1299498714036; Mon, 07 Mar 2011 03:51:54 -0800 (PST) Received: from mail.codesourcery.com (mail.codesourcery.com [38.113.113.100]) by mx.google.com with ESMTPS id q8si4683829qcu.119.2011.03.07.03.51.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Mar 2011 03:51:52 -0800 (PST) Received-SPF: pass (google.com: domain of ams@codesourcery.com designates 38.113.113.100 as permitted sender) client-ip=38.113.113.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ams@codesourcery.com designates 38.113.113.100 as permitted sender) smtp.mail=ams@codesourcery.com Received: (qmail 30545 invoked from network); 7 Mar 2011 11:51:50 -0000 Received: from unknown (HELO ?192.168.0.104?) (ams@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Mar 2011 11:51:50 -0000 Message-ID: <4D74C6D4.9000403@codesourcery.com> Date: Mon, 07 Mar 2011 11:51:48 +0000 From: Andrew Stubbs Organization: CodeSourcery User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: patches@linaro.org Subject: Fwd: [patch,ARM] New ARM VFP test cases -------- Original Message -------- Subject: [patch,ARM] New ARM VFP test cases Date: Wed, 02 Feb 2011 15:55:00 +0000 From: Andrew Stubbs Organization: CodeSourcery To: gcc-patches@gcc.gnu.org I'm posting these new (ok, rather old) testcases on behalf of Kazu. I've tested that they pass ok, with both thumb and arm mode. OK to commit? Andrew 2006-04-21 Kazu Hirata gcc/testsuite/ * gcc.target/arm/vfp-ldmdbd.c, gcc.target/arm/vfp-ldmdbs.c, gcc.target/arm/vfp-ldmiad.c, gcc.target/arm/vfp-ldmias.c, gcc.target/arm/vfp-stmdbd.c, gcc.target/arm/vfp-stmdbs.c, gcc.target/arm/vfp-stmiad.c, gcc.target/arm/vfp-stmias.c: New. --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbd.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +extern void bar (double); + +void +foo (double *p, double a, int n) +{ + do + bar (*--p + a); + while (n--); +} + +/* { dg-final { scan-assembler "fldmdbd" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +extern void baz (float); + +void +foo (float *p, float a, int n) +{ + do + bar (*--p + a); + while (n--); +} + +/* { dg-final { scan-assembler "fldmdbs" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmiad.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +extern void bar (double); + +void +foo (double *p, double a, int n) +{ + do + bar (*p++ + a); + while (n--); +} + +/* { dg-final { scan-assembler "fldmiad" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmias.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +extern void baz (float); + +void +foo (float *p, float a, int n) +{ + do + bar (*p++ + a); + while (n--); +} + +/* { dg-final { scan-assembler "fldmias" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-stmdbd.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +void +foo (double *p, double a, double b, int n) +{ + double c = a + b; + do + *--p = c; + while (n--); +} + +/* { dg-final { scan-assembler "fstmdbd" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-stmdbs.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +void +foo (float *p, float a, float b, int n) +{ + float c = a + b; + do + *--p = c; + while (n--); +} + +/* { dg-final { scan-assembler "fstmdbs" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-stmiad.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +void +foo (double *p, double a, double b, int n) +{ + double c = a + b; + do + *p++ = c; + while (n--); +} + +/* { dg-final { scan-assembler "fstmiad" } } */ --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-stmias.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_vfp_ok } */ +/* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ + +void +foo (float *p, float a, float b, int n) +{ + float c = a + b; + do + *p++ = c; + while (n--); +} + +/* { dg-final { scan-assembler "fstmias" } } */