From patchwork Wed Feb 2 15:55:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 81469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 80A0EB7109 for ; Thu, 3 Feb 2011 02:55:16 +1100 (EST) Received: (qmail 32660 invoked by alias); 2 Feb 2011 15:55:14 -0000 Received: (qmail 32651 invoked by uid 22791); 2 Feb 2011 15:55:13 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, TW_VF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Feb 2011 15:55:06 +0000 Received: (qmail 5681 invoked from network); 2 Feb 2011 15:55:04 -0000 Received: from unknown (HELO ?192.168.0.104?) (ams@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Feb 2011 15:55:04 -0000 Message-ID: <4D497E54.3040803@codesourcery.com> Date: Wed, 02 Feb 2011 15:55:00 +0000 From: Andrew Stubbs User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: [patch,ARM] New ARM VFP test cases Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list 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" } } */