From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42810 invoked by alias); 21 May 2018 21:46:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 41845 invoked by uid 89); 21 May 2018 21:46:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy= X-HELO: gcc1-power7.osuosl.org Received: from gcc1-power7.osuosl.org (HELO gcc1-power7.osuosl.org) (140.211.15.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 May 2018 21:46:38 +0000 Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id ACA6B12407EE; Mon, 21 May 2018 21:46:36 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: [PATCH] testsuite: Introduce be/le selectors Date: Mon, 21 May 2018 21:59:00 -0000 Message-Id: X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg01093.txt.bz2 This patch creates "be" and "le" selectors, which can be used by all architectures, similar to ilp32 and lp64. Is this okay for trunk? Segher 2017-05-21 Segher Boessenkool gcc/testsuite/ * lib/target-supports.exp (check_effective_target_be): New. (check_effective_target_le): New. --- gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index cfc22a2..3b9460d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2641,6 +2641,22 @@ proc check_effective_target_long_neq_int { } { }] } +# Return 1 if we're generating big-endian code. + +proc check_effective_target_be { } { + return [check_no_compiler_messages be object { + int dummy[__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? 1 : -1]; + }] +} + +# Return 1 if we're generating little-endian code. + +proc check_effective_target_le { } { + return [check_no_compiler_messages le object { + int dummy[__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ? 1 : -1]; + }] +} + # Return 1 if the target supports long double larger than double, # 0 otherwise. -- 1.8.3.1