From patchwork Wed Jul 8 21:53:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 11652781 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D7D013BD for ; Wed, 8 Jul 2020 21:55:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1773E20772 for ; Wed, 8 Jul 2020 21:55:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BYcsA7E/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725915AbgGHVzg (ORCPT ); Wed, 8 Jul 2020 17:55:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgGHVzg (ORCPT ); Wed, 8 Jul 2020 17:55:36 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0769C061A0B for ; Wed, 8 Jul 2020 14:55:35 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id l12so51353ejn.10 for ; Wed, 08 Jul 2020 14:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NJLdNlLknV7LWbEL4fadKXiGr4UkDRdoEcI32y7pxzo=; b=BYcsA7E/CQoWdxVVs/Aw0NSeHXo8YyR3DOEIvXJ2NjEWpXzqQK/RG8x0j1wJfhpDD6 y2CFU93qE7K7UmCs/8j7M69bziNTeyujQ12FwWKb/LNx84FRMk35f073+pW5DF3G9AZZ RyqvtWEakQjEg2YMiTg/+GYMmO/K0FOyZQNkfmvlqENbkk2kQ11ixncSRWW2hpwPXxHb 62dXyIrVwXAnPR6N+tKpsyXVeDspgZ925YBf05/BAWZOXaOR2+FkxsUEjF6eR9rTXdzm PkZ+r7Oapc8KCskt35yEPakBdZIL5/ZS5389y2pdF3SYVniTTDjK92ECh73VCPlIuNHU 8qsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NJLdNlLknV7LWbEL4fadKXiGr4UkDRdoEcI32y7pxzo=; b=MZwufif9fWjVEhO3B91NwyiCRxz9KeZAoCffumhFf58SN95totMrTdNpC+R4nIPaB/ q2dW+vNSqF6ZMWkejP1wUSW0K7f9DpgRa8NTQzkixZG+VKUwPxV3J6yrjQ0L8437HbZd qZhiLrOvm0jFx8QOb+EHH8BXLJ+6yyGPoVngRRczU+x/YfUoOw4AiS6dj9c3lFNAc4iK raW3X6Eu8rv1cT0ETpNzZvqgashinlJDa2QR3nKOHFCJua4lh0NtwjQMWK4EYSrjw2Pf k1bdDFXYFUtNQ7wt0rIdI16ERqpTf5YGCHFrGr6cc4MVJFi7fRTpe5XA/VKChw3UDDMD cTSA== X-Gm-Message-State: AOAM531qtNloJ4bCgwHZa8Ssyk7zS4dtEa5yn60P3SznhB19d0LC5MQN res/MxK47bu5xGQHx5fIOCcswi9E X-Google-Smtp-Source: ABdhPJzVe2XpHhM6Oo4LF0VBj7GaIUSKksIHiSQP8EMjIdKHGWlDjDYOGUCTvabFk12Zbblmx5HbGA== X-Received: by 2002:a17:906:c083:: with SMTP id f3mr46167847ejz.530.1594245334384; Wed, 08 Jul 2020 14:55:34 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:b7f9:7600:b1eb:f280:ff97:eab2]) by smtp.gmail.com with ESMTPSA id a8sm478999ejp.51.2020.07.08.14.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 14:55:33 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Luc Van Oostenryck Subject: [PATCH 1/3] mips: add predefines __MIPSEL__ or __MIPSEB__ & friends Date: Wed, 8 Jul 2020 23:53:27 +0200 Message-Id: <20200708215329.56404-2-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200708215329.56404-1-luc.vanoostenryck@gmail.com> References: <20200708215329.56404-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org Signed-off-by: Luc Van Oostenryck --- target-mips.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target-mips.c b/target-mips.c index 3d73236feffd..1ff0760c2446 100644 --- a/target-mips.c +++ b/target-mips.c @@ -10,6 +10,16 @@ static void predefine_mips(const struct target *self) predefine("_MIPS_SZINT", 1, "%d", int_ctype.bit_size); predefine("_MIPS_SZLONG", 1, "%d", long_ctype.bit_size); predefine("_MIPS_SZPTR", 1, "%d", ptr_ctype.bit_size); + + if (arch_big_endian) { + predefine("_MIPSEB", 1, "1"); + predefine("__MIPSEB", 1, "1"); + predefine("__MIPSEB__", 1, "1"); + } else { + predefine("_MIPSEL", 1, "1"); + predefine("__MIPSEL", 1, "1"); + predefine("__MIPSEL__", 1, "1"); + } } From patchwork Wed Jul 8 21:53:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 11652783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2E0314B7 for ; Wed, 8 Jul 2020 21:55:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3E1C20772 for ; Wed, 8 Jul 2020 21:55:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N9Mfm2a7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbgGHVzh (ORCPT ); Wed, 8 Jul 2020 17:55:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgGHVzh (ORCPT ); Wed, 8 Jul 2020 17:55:37 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D45D9C061A0B for ; Wed, 8 Jul 2020 14:55:36 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id n26so100730ejx.0 for ; Wed, 08 Jul 2020 14:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=I/1mN0pIqQchc7+X9ti2jVU71lrwnR2dwc1SVufQkIg=; b=N9Mfm2a7Ji9gkSboNGVo0UblW+oC6clVAYlRXflR8A+69cSM9HIdUa4je85PHJ4EyL XhjtpuMI/SQ1kYmQCrjt8Wo3jnmtrWdQNiy6c4P6RL0LdTppWzWl4ClE+JcILcdZhh2Q YT9Er4o0htWfGboHYd44P/zEEMhbe3tP685YI4Ih2G4l/pFxgCW4nkDocYfapn8L1WA+ ePT+p3xGpQDV4M8+qaiQyHv9SzJN5DjLd4Ex9WDURWprVVL7dbIcAhoOPBvs7+slWmqx V4+5QkepOmYRwQaqUxb052XSU2Z4ObINOUbyNmXyjWJhjMLB3wBejLO1gwh1SEwEghc5 jN+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=I/1mN0pIqQchc7+X9ti2jVU71lrwnR2dwc1SVufQkIg=; b=ADOg39YyEReWa9WNMATLjM7SAqTKmehUmfZb4+s/zoOXIAwwbU7Lp+5qeWn9mXSnPK 4LcLPY/MxwFn121DfXagMJsUFykh3kvc4sSA75FUGvp0+vge+DYa/wDrtpLdpP8a0bE/ lwMYZbiTcypMEyuEQPfJ+AtkUl/DF7/oO5A/wfWtpywp45J3JCHcTW7qfCmWpiUiotPg Mt/cX76LQaw5lL8cjZ6qCc2uhv7XaNgoYCBlpsnCvhBvRUZESiY5urjgyX47zNuukSFj 92q1DEPMbsre8tuwpBWI5Nz6/NPN64pvwZOgYhOM5l3TJOc/PniwQf8uB5Mmr5U8VkBA ghSw== X-Gm-Message-State: AOAM532tPNpfG0H7N1z583zH1iglqdn0A5OculUNLs1cHer4VebD8sjN RFeNoZaXSGRK64aF4V2jtQlBTE/f X-Google-Smtp-Source: ABdhPJzbN9fGsjCfnTugXJphOPGtUKMkJ033GKsJbsL3AfFpZHifYdH0mRbZRpvybA4BrhNwNJU3AQ== X-Received: by 2002:a17:906:3984:: with SMTP id h4mr48579723eje.254.1594245335333; Wed, 08 Jul 2020 14:55:35 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:b7f9:7600:b1eb:f280:ff97:eab2]) by smtp.gmail.com with ESMTPSA id a8sm478999ejp.51.2020.07.08.14.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 14:55:34 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Luc Van Oostenryck Subject: [PATCH 2/3] arm64: add predefine for endianness Date: Wed, 8 Jul 2020 23:53:28 +0200 Message-Id: <20200708215329.56404-3-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200708215329.56404-1-luc.vanoostenryck@gmail.com> References: <20200708215329.56404-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org Depending on the endianness, predefine '__AARCH64EL__' or '__AARCH64EB__'. Signed-off-by: Luc Van Oostenryck --- target-arm64.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-arm64.c b/target-arm64.c index 8619bd842f9b..d92ab16be592 100644 --- a/target-arm64.c +++ b/target-arm64.c @@ -20,6 +20,11 @@ static void predefine_arm64(const struct target *self) predefine("__aarch64__", 1, "1"); + if (arch_big_endian) + predefine("__AARCH64EB__", 0, "1"); + else + predefine("__AARCH64EL__", 0, "1"); + if (cmodel) predefine_strong("__AARCH64_CMODEL_%s__", cmodel); } From patchwork Wed Jul 8 21:53:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 11652785 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F60F13B4 for ; Wed, 8 Jul 2020 21:55:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5868920772 for ; Wed, 8 Jul 2020 21:55:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dk/40Y+G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbgGHVzi (ORCPT ); Wed, 8 Jul 2020 17:55:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgGHVzh (ORCPT ); Wed, 8 Jul 2020 17:55:37 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF38C061A0B for ; Wed, 8 Jul 2020 14:55:37 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id dm19so186464edb.13 for ; Wed, 08 Jul 2020 14:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kYIXmf/CWlEnkMTzhalIJaijA4G+ikl4osXjZhl2e1U=; b=dk/40Y+GV9w4v4Op/JjBTNRKByaAtmyLzL+vc6DAcy3nog+ZrDIREpug+kEkceakJ+ rHt4TRq1jA9CKeVF4UAtLALa9nrXxe943IJArNfLv920ZigzAYtjaM3IKwhuPnlqhH15 O3n6pvD9vYVC8Z9JP+ceNO9l7CDV0EqaZ1IYGTmDG7irDEqlpomNbBl1LSICO7XBkZQH nLmfJnjxMpH5iwBlY5cRkIWncr6N4eUCqehAZxQaSfKbYKe6E7GNma2urVBZVffLQu0L Lin5H69VMx7I7jLRnb8wXkUeqTyU+qCzn5LwCYzyGD8txFzr0Wu5XbrCaCmvIIMfPLIq 8siQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kYIXmf/CWlEnkMTzhalIJaijA4G+ikl4osXjZhl2e1U=; b=falJeFg2oS3NCAAEAdCa2jFl6Phvv4gGYE1P/qR+ayrk8MopHyirFLnP/5EA1rDxxb qyrqjxZCubxnxl4f672lXMuZ1/aKpxxWA36mZB9lrSTNRaoMSB+PzkxNojWaN9eL0MJl mPYGZzDgi8n99+unIzy8xD5yErMUyefilGE3Fju1OrgdUGPxMClrVnWoQicDznPjrbc7 fGWMrc0RQ1pfXpyacr+Ttv1xxKl05Q+A2z0QdM1xPRJLXj9CPRSzc4F6UcjVf9GqZhEZ usaujf09HINIbDN9GuTJfste8L3RbU97WICORJuP3AJBY9T0Fg4PRK0nlYgKEKnK6CbF DkDA== X-Gm-Message-State: AOAM532JAktkLJBVHlYgagyXu7GxiGWz+oRC4Xbd2O+f4y4oddqJ4zMf bud8tIf8+jvFV4bzlOsx8nDSvBEu X-Google-Smtp-Source: ABdhPJxbCh9BsCS9kHRN0VS4iCFvQ729Wm3GkzZSVH5ED/Inln10ePQ4JPR69BPfEV+nRiGYHrin+g== X-Received: by 2002:a50:d513:: with SMTP id u19mr66932906edi.241.1594245336193; Wed, 08 Jul 2020 14:55:36 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:b7f9:7600:b1eb:f280:ff97:eab2]) by smtp.gmail.com with ESMTPSA id a8sm478999ejp.51.2020.07.08.14.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 14:55:35 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Luc Van Oostenryck Subject: [PATCH 3/3] arm: add predefine __ARMEL__ or __ARMEB__ Date: Wed, 8 Jul 2020 23:53:29 +0200 Message-Id: <20200708215329.56404-4-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200708215329.56404-1-luc.vanoostenryck@gmail.com> References: <20200708215329.56404-1-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org Depending on the endianness, predefine '__ARMEL__' or '__ARMEB__'. Signed-off-by: Luc Van Oostenryck --- target-arm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target-arm.c b/target-arm.c index 0d7c6134795f..382bd3decfe1 100644 --- a/target-arm.c +++ b/target-arm.c @@ -19,6 +19,11 @@ static void predefine_arm(const struct target *self) predefine("__ARM_PCS", 1, "1"); break; } + + if (arch_big_endian) + predefine("__ARMEB__", 0, "1"); + else + predefine("__ARMEL__", 0, "1"); } const struct target target_arm = {