From patchwork Thu Jan 21 12:57:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1429821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Or5YqGwq; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DM2W24FJwz9sW4 for ; Thu, 21 Jan 2021 23:58:06 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D34EB3865483; Thu, 21 Jan 2021 12:58:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D34EB3865483 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1611233883; bh=XdIm2wXBx35UwK4e60JGH853wGDo58Kdox4Bzo43D60=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=Or5YqGwqlqotwohF6ZcQMBtRqewKiaf+pQhsGQaTntGmea4IZmdNjyphOyfWVYi3B zwEP6nnjGcVmlUzbSJ1HvXhb+1yWVOct6STnw/sv3ZE3VTe7A4qw2aqxoRVpDvlsaa VJIgxDycekzXZG785xPsl9EGDo9CU1T3VTa3VHiU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80052.outbound.protection.outlook.com [40.107.8.52]) by sourceware.org (Postfix) with ESMTPS id EB7163851C01 for ; Thu, 21 Jan 2021 12:57:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EB7163851C01 Received: from AM5PR04CA0010.eurprd04.prod.outlook.com (2603:10a6:206:1::23) by AM0PR08MB4500.eurprd08.prod.outlook.com (2603:10a6:208:147::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Thu, 21 Jan 2021 12:57:57 +0000 Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:1:cafe::40) by AM5PR04CA0010.outlook.office365.com (2603:10a6:206:1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12 via Frontend Transport; Thu, 21 Jan 2021 12:57:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Thu, 21 Jan 2021 12:57:57 +0000 Received: ("Tessian outbound f362b81824dc:v71"); Thu, 21 Jan 2021 12:57:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b1738f462b5a6812 X-CR-MTA-TID: 64aa7808 Received: from aa059d2f214f.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FCE413AA-0854-40FB-8554-815D3A868598.1; Thu, 21 Jan 2021 12:57:51 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id aa059d2f214f.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 21 Jan 2021 12:57:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BPDYdpyU75y5MqF045KEt5EKGpbbACLcyTJLW0q2Q9Oqy90FQ1yqhf6VGxgvjZoO1man9yEh+xD9KXhY3NEkuZmaTjjbK4NGAwBxJUM7rGuHtX8xIbIAZAWwW8WloRvFzJRMMsDRNQJq1Uf10Ihham2rhbUlHZZKPZN+Yf/klsC1kRX5kzrV6365d5I4bM+cmSp3Y9yE7Kfav9P/GNlMxyS/M2wnDszbJ1/cJ8e6lU7rJaramCNJ3hM+qKm48+8CJKnPmzVVUev8TsDk4KHGt/Ei5K4Z2MYHcIOLuZ8bgqXbI98NZSEtMNxObpsH2xTP1EE36Rq4BNpW4OQ998jV4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XdIm2wXBx35UwK4e60JGH853wGDo58Kdox4Bzo43D60=; b=lAJEsBkcEhjsJ1zir2p9nChgSQ7cvpSbT5u6LzlV18Q5peTsoq98jLyrMuc9iQ85LdPY2c8BzsUSAb+c7EcXQb26Q0QcdBSxGlPKLjkE0gP/xRsIi45iy4yWLOi2WlwPlnBtEl5dcNTFF68ASpFQC4JrMYnXAuw2cr5TQB+HMZ+se13J2KBqtCea7zHHTFlBA13RFvru8iGtRD4i0KOfifJ09rl1eFat1xbFJW8UDxzRESVkvOZ/XokAK4tqp9qZJwR9ZYGMApEbohTgeEqVp0e191xzyR4btheq7/yNgUZ5yZTmKQjYqEgQhZ8VyTiMKZXfZYHyo3t28sh7CE5N6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Received: from VE1PR08MB5599.eurprd08.prod.outlook.com (2603:10a6:800:1a1::12) by VI1PR08MB2912.eurprd08.prod.outlook.com (2603:10a6:802:1a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Thu, 21 Jan 2021 12:57:50 +0000 Received: from VE1PR08MB5599.eurprd08.prod.outlook.com ([fe80::6d00:2694:e0d7:986f]) by VE1PR08MB5599.eurprd08.prod.outlook.com ([fe80::6d00:2694:e0d7:986f%6]) with mapi id 15.20.3784.013; Thu, 21 Jan 2021 12:57:49 +0000 To: GCC Patches Subject: [GCC8 backport] AArch64: Fix symbol offset limit (PR 98618) Thread-Topic: [GCC8 backport] AArch64: Fix symbol offset limit (PR 98618) Thread-Index: AQHW7/TpbDgrzLQv0kKD6zXgx32uEw== Date: Thu, 21 Jan 2021 12:57:49 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; x-originating-ip: [82.24.249.100] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 65ab9cd5-1946-4f72-b0c4-08d8be0c2cdd x-ms-traffictypediagnostic: VI1PR08MB2912:|AM0PR08MB4500: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: BJrtmMgIhmHidkcQHvWcuscd9S0eQKYvpIwAG4ERGl22eXLowlSdky1nePNThGQayt09KYMhlptkw04R0AbyOOkNBYlpVYSkOnuiTuiPvfve9YreE5vRRxTNG34iSVVJ2VtqM+WBdbFuTZaqocXoPpKoqGQiA5w5MKPqilbmub5t5rCO7sG5n/GoPri699aVbYPIlHBcpDhFaPjFIcbnzpos0JXV/+M3KGwCpIJjP6QiY+EKhCV4h1d2Oaxp5+9JFoZFuVAN74fA1VZSz49gQ5IEqV4gN/Sg6Sc4LOm1XRfWegsWleX96ZwFjmlW08d/bF/dpEa5ATg+z5OqjWyJLLBuEgcb7L3i4+WQF0r9wfYCxbsLVTf5NaOlEq4x8OQXIaxhys9wGkIDvK4Cb+UGInsQ7txElWFsGXIrjnehNaMJJ5vaRfOuhHjiF52jLrm7aQ5/auVfoozoIqhQKrjoWnhs0gSt3iAr1dJG8EzPeOZf2hiaTtgf87gn4Msurh33CoECEByZGK7DR4+p2KYozg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB5599.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(39860400002)(136003)(366004)(376002)(316002)(71200400001)(55016002)(8676002)(4326008)(6916009)(8936002)(26005)(6506007)(5660300002)(186003)(478600001)(33656002)(83380400001)(76116006)(2906002)(86362001)(91956017)(66446008)(66476007)(66556008)(54906003)(52536014)(64756008)(7696005)(66946007)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?q?Oud9ieeTiNC0E3yKVQjJzrgtp?= =?iso-8859-1?q?cO+YVSGAxI0NI57RLy45sX8bGxm1P2e6U5nHxZl/IFLx+6LK0Ofq7W8kcXvY?= =?iso-8859-1?q?Pyod+qUfGIKJUb/1S39jVOv+8eBhJms8Ajp4yBqNRynP/dGcA7S0KzMSlDkZ?= =?iso-8859-1?q?WSv4jnkwU8Xw4d5ldcl5MVXgnTYA6EYcTMzDI3n3dpNA/vvWaWfKqdRRbPjJ?= =?iso-8859-1?q?MmLA011rthHNvSua5zFdTQK/1Lby1wez6H/rb2HZd28VcRnrec6FgNvrsJls?= =?iso-8859-1?q?/pLBT+X7QFRs2tQNCcR6/2WVAfOdnJ46X4obJN59f5JwGZg5Km8op54RKYeS?= =?iso-8859-1?q?o7AiQNvK9DTrXzOKGlo5kSudK3FVDEqMhKbLYKlO8Z+Vzo9glUjVkggdkFw2?= =?iso-8859-1?q?HpG48lV+28/h7u9SV9p986lhHCHb1EiOKsF4Db7V64MeV/VWNNbaA4MD5+m0?= =?iso-8859-1?q?HTECyOPwGhlB0+vqoVoqY8nFNerj05VVBnsU9d37FMecoTgKed3tV9RJLfqQ?= =?iso-8859-1?q?KkcEaq1YejCp0maM0tdkVX8PWK3LCG7m+nz9FseGclmX/SRMRQ+Tt49RIz7J?= =?iso-8859-1?q?mWJORRSJRd1ijhjblcmZdQUD/ARFk07zJsc2qyS1Czwzjagmlzxt3dnsECle?= =?iso-8859-1?q?QY5DIrgW7mPMCK6HsXBbts9r5dk41ciqV/ITC9338Buqph8PXsmK4KPRtNwI?= =?iso-8859-1?q?dh+/ECwqW3cYi+n57rt0rEyUpa0v1R+4UMNnledP9XEsmhb2LTYtAm9j5j59?= =?iso-8859-1?q?JziJOZyeoKPy8zRWvj/+ZBUBQrHkK7sU+EuK3hVA5j4vqrN/6R6YQG3oKdqP?= =?iso-8859-1?q?27HbZFu5lSI4Vrr9d3nrB0PcxEzZ1jKNjx88Syiu+eh1Ir/FTETsj/GzkpRc?= =?iso-8859-1?q?LxX52bCbrTiDKs9SKTytKOb4F2M8tn7Cv3pm4x52QIVnl0bbQGvbsmUN8UPf?= =?iso-8859-1?q?EKh7bJNDc7ZDsWgpXxHG7EVG3AwkwbCfEDCfC/nH4OOsHL5be3e1mHghaozW?= =?iso-8859-1?q?xPQ2zVPDohqrnNi77U=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2912 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 7656e6b2-d29f-435d-30df-08d8be0c286b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JChD46/ht3eNn7mNoy0fvUHl7pztk0aX5Is6p44FRu48OjjH/OX8Hndq0rECQsBJLPRiTJh0xjSTio9FvMBVHQVpk0aErkWP0CptcBbbM2fi4KfFrQkOxiWp3G+AChAXcu4qQxVmBWk1nrrqN0YQsAMcwZLBY2AXsIbECqyV5hHmtypRR1eqmSurtKc9MCpN43zsySsCng2tKY6cvZ14whaUHZKxnYHUZ+TW+FxjFQvWPc/K0wEfaPJlcvFMYvC3Uy2m0LoPOyexvG6FsnU4gjxI9cRaLPT1go2ntrLJpXrXE2jqSuRyansAEGQJsrXZApVqJF4RwzIF4erbQCQwlxah5Cl2Cfdzr7NsOYCOIAKytlXuJKIzQpY1Pr5jDckofFnrnwNSD1SqnYpCf+sZvH924VXE6wA9mzBk1dtNmxkXHZ8ogJqF8fqxrHLS06txJUb++NoIH1RPYyV4KekwVg== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(396003)(136003)(46966006)(2906002)(7696005)(52536014)(5660300002)(4326008)(86362001)(8936002)(336012)(9686003)(55016002)(82740400003)(47076005)(6506007)(82310400003)(81166007)(478600001)(70586007)(33656002)(186003)(316002)(8676002)(70206006)(6916009)(54906003)(83380400001)(26005)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2021 12:57:57.3966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65ab9cd5-1946-4f72-b0c4-08d8be0c2cdd X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4500 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Wilco Dijkstra via Gcc-patches From: Wilco Dijkstra Reply-To: Wilco Dijkstra Cc: Richard Sandiford , Richard Earnshaw Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" In aarch64_classify_symbol symbols are allowed large offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself. This results in relocation overflow and link-time errors for simple expressions like &global_array + 0xffffff00. To avoid this, unless the offset_within_block_p is true, limit the offset to +/-1MB so that the symbol needs to be within a 3.9GB offset from its references. For the tiny code model use a 64KB offset, allowing most of the 1MB range for code/data between the symbol and its references. gcc/ PR target/98618 * config/aarch64/aarch64.c (aarch64_classify_symbol): Apply reasonable limit to symbol offsets. gcc/testsuite/ PR target/98618 * gcc.target/aarch64/symbol-range.c: Improve testcase. * gcc.target/aarch64/symbol-range-tiny.c: Likewise. (cherry picked from commit 7d3b27ff12610fde9d6c4b56abc70c6ee9b6b3db) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e8e73b8ea92b0dd3b9de661652c30c26c07bec86..7c4cf75b5a5e2394dc0b3f69b68d93df8f88111f 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -12011,26 +12011,31 @@ aarch64_classify_symbol (rtx x, HOST_WIDE_INT offset) the offset does not cause overflow of the final address. But we have no way of knowing the address of symbol at compile time so we can't accurately say if the distance between the PC and - symbol + offset is outside the addressible range of +/-1M in the - TINY code model. So we rely on images not being greater than - 1M and cap the offset at 1M and anything beyond 1M will have to - be loaded using an alternative mechanism. Furthermore if the - symbol is a weak reference to something that isn't known to - resolve to a symbol in this module, then force to memory. */ - if ((SYMBOL_REF_WEAK (x) - && !aarch64_symbol_binds_local_p (x)) - || !IN_RANGE (offset, -1048575, 1048575)) + symbol + offset is outside the addressible range of +/-1MB in the + TINY code model. So we limit the maximum offset to +/-64KB and + assume the offset to the symbol is not larger than +/-(1MB - 64KB). + If offset_within_block_p is true we allow larger offsets. + Furthermore force to memory if the symbol is a weak reference to + something that doesn't resolve to a symbol in this module. */ + + if (SYMBOL_REF_WEAK (x) && !aarch64_symbol_binds_local_p (x)) return SYMBOL_FORCE_TO_MEM; + if (!(IN_RANGE (offset, -0x10000, 0x10000) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + return SYMBOL_TINY_ABSOLUTE; case AARCH64_CMODEL_SMALL: /* Same reasoning as the tiny code model, but the offset cap here is - 4G. */ - if ((SYMBOL_REF_WEAK (x) - && !aarch64_symbol_binds_local_p (x)) - || !IN_RANGE (offset, HOST_WIDE_INT_C (-4294967263), - HOST_WIDE_INT_C (4294967264))) + 1MB, allowing +/-3.9GB for the offset to the symbol. */ + + if (SYMBOL_REF_WEAK (x) && !aarch64_symbol_binds_local_p (x)) return SYMBOL_FORCE_TO_MEM; + if (!(IN_RANGE (offset, -0x100000, 0x100000) + || offset_within_block_p (x, offset))) + return SYMBOL_FORCE_TO_MEM; + return SYMBOL_SMALL_ABSOLUTE; case AARCH64_CMODEL_TINY_PIC: diff --git a/gcc/testsuite/gcc.target/aarch64/symbol-range-tiny.c b/gcc/testsuite/gcc.target/aarch64/symbol-range-tiny.c index d7e46b059e41f2672b3a1da5506fa8944e752e01..fc6a4f3ec780d9fa86de1c8e1a42a55992ee8b2d 100644 --- a/gcc/testsuite/gcc.target/aarch64/symbol-range-tiny.c +++ b/gcc/testsuite/gcc.target/aarch64/symbol-range-tiny.c @@ -1,12 +1,12 @@ -/* { dg-do compile } */ +/* { dg-do link } */ /* { dg-options "-O3 -save-temps -mcmodel=tiny" } */ -int fixed_regs[0x00200000]; +char fixed_regs[0x00080000]; int -foo() +main () { - return fixed_regs[0x00080000]; + return fixed_regs[0x000ff000]; } /* { dg-final { scan-assembler-not "adr\tx\[0-9\]+, fixed_regs\\\+" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/symbol-range.c b/gcc/testsuite/gcc.target/aarch64/symbol-range.c index 6574cf4310430b847e77ea56bf8f20ef312d53e4..d8e82fa1b2829fd300b6ccf7f80241e5573e7e17 100644 --- a/gcc/testsuite/gcc.target/aarch64/symbol-range.c +++ b/gcc/testsuite/gcc.target/aarch64/symbol-range.c @@ -1,12 +1,12 @@ -/* { dg-do compile } */ +/* { dg-do link } */ /* { dg-options "-O3 -save-temps -mcmodel=small" } */ -int fixed_regs[0x200000000ULL]; +char fixed_regs[0x80000000]; int -foo() +main () { - return fixed_regs[0x100000000ULL]; + return fixed_regs[0xfffff000]; } /* { dg-final { scan-assembler-not "adrp\tx\[0-9\]+, fixed_regs\\\+" } } */