From patchwork Tue Nov 19 15:04:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 292471 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4BEA02C009C for ; Wed, 20 Nov 2013 02:06:24 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:to:date:from:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=N7XTJpfBwF7J8pGu CmQcqwQd7RK9bXeLReDDlrNbt31DpE0aMDOZmO2Vy/+bc0We3oRKa/6qtw2GTqC0 DYy6aO/uIviaV1k66ujy7w//sI714sP1fgCL/Sc8hKR2UCW7tbl4O4KsIrpeZmoY HWqPl3KwD4oBDX9iirh05ZP9fCA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:to:date:from:mime-version:content-type :content-transfer-encoding; s=default; bh=Usr1vDEmkY9w6OBnGr6kQF Fgr7c=; b=dc45itM5jzk/wB+71ScEDPNtsem2x8HGo+Qc+UokR0TKMTDBr5414+ fAR7egYNM8Vpk5kFwRi3WYDz9M799aB19v0LS+jBBCN05gKAeaptquj8D/7QyZRM 7ig5fJcWdfZBIhac17Z0bYxhSjzi2VpavOwn1J4/GcY+Zz6gr7INI= Received: (qmail 12448 invoked by alias); 19 Nov 2013 15:05:35 -0000 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 Received: (qmail 12417 invoked by uid 89); 19 Nov 2013 15:05:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_40, MSGID_FROM_MTA_HEADER, RDNS_NONE, SPF_PASS autolearn=no version=3.3.2 X-HELO: e06smtp15.uk.ibm.com Received: from Unknown (HELO e06smtp15.uk.ibm.com) (195.75.94.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 19 Nov 2013 15:04:49 +0000 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Nov 2013 15:04:38 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 19 Nov 2013 15:04:38 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 9A576219005C for ; Tue, 19 Nov 2013 15:04:37 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rAJF4Pvv66846968 for ; Tue, 19 Nov 2013 15:04:25 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rAJF4awk025986 for ; Tue, 19 Nov 2013 08:04:36 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id rAJF4VWZ025732; Tue, 19 Nov 2013 08:04:31 -0700 Message-Id: <201311191504.rAJF4VWZ025732@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 19 Nov 2013 16:04:31 +0100 Subject: [PATCH, rs6000] Make ppc64-abi-2.c test case endian safe To: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Date: Tue, 19 Nov 2013 16:04:31 +0100 (CET) From: "Ulrich Weigand" MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13111915-0342-0000-0000-000006E93D92 Hello, some routines in the ppc64-abi-2.c test case attempt to verify that the slots of the parameter save area in the caller hold correct values. However, those slots holds (parts of) "vector int" data, which the test case compares against immediate long values. This of course hard-codes byte order. The patch below fixes the test to construct appropriate values for both byte orders, which fixes the test failure on powerpc64le. Tested on powerpc64le-linux. OK for mainline? Bye, Ulrich Index: gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c (revision 205009) +++ gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c (working copy) @@ -121,6 +121,12 @@ vector int v; } vector_int_t; +#ifdef __LITTLE_ENDIAN__ +#define MAKE_SLOT(x, y) ((long)x | ((long)y << 32)) +#else +#define MAKE_SLOT(x, y) ((long)y | ((long)x << 32)) +#endif + /* Paramter passing. s : gpr 3 v : vpr 2 @@ -228,8 +234,8 @@ sp = __builtin_frame_address(0); sp = sp->backchain; - if (sp->slot[2].l != 0x100000002ULL - || sp->slot[4].l != 0x500000006ULL) + if (sp->slot[2].l != MAKE_SLOT (1, 2) + || sp->slot[4].l != MAKE_SLOT (5, 6)) abort(); } @@ -270,8 +276,8 @@ sp = __builtin_frame_address(0); sp = sp->backchain; - if (sp->slot[4].l != 0x100000002ULL - || sp->slot[6].l != 0x500000006ULL) + if (sp->slot[4].l != MAKE_SLOT (1, 2) + || sp->slot[6].l != MAKE_SLOT (5, 6)) abort(); } @@ -298,8 +304,8 @@ sp = __builtin_frame_address(0); sp = sp->backchain; - if (sp->slot[4].l != 0x100000002ULL - || sp->slot[6].l != 0x500000006ULL) + if (sp->slot[4].l != MAKE_SLOT (1, 2) + || sp->slot[6].l != MAKE_SLOT (5, 6)) abort(); }