From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by sourceware.org (Postfix) with ESMTPS id E3EC23858D1E for ; Sat, 22 Oct 2022 07:26:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3EC23858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb2b.google.com with SMTP id t186so5668838yba.12 for ; Sat, 22 Oct 2022 00:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vqB+AaffTpXwQFroxhC0kjuz/msjUyiGknZqvqDGxnU=; b=j+WSGS8X5d6TxOeDLcIwoEY0DuIQA2/SAHWmpGkjIfA49NPHl0Z4qQ7HNaOEp8tyed PgaXg9Aii60PK2f2UU7uvceb6AJ+49vZclagMzur5zC4AMsPU2upI2NctkUuxKehRaOX +VAYvsVKQru7lkIFA73A9cdLy4wdaUd1QFcpKiVbOOkUFRVi53DOdvvCCQJJeTPDZGER dDBQnUYkmKNwLTmIhkkPcbiEvkZ/PN8VP/2thPgVNfD4jy1NTb9/xNinBiXRjI+sd3y2 QCRZllTofsEOas1n3odCqin/VSYxxHVmokB+yHxVkLAiWT0RXJCxTyFLCn2rqH7+zFE5 5lJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vqB+AaffTpXwQFroxhC0kjuz/msjUyiGknZqvqDGxnU=; b=CWDKkykr4Lt46GgUoKXa8uLdQPHEGoquOXD/SHhQpRtFMzQYNsNc/3Sns6jnqLGmJy XT94vRISRTHaitmahG3pV95Wr4C9d/KULPY4Y0yADq2EyIsY9P4cDUSCU5/e/xDOymgJ vtWKch4zVcqhmEzI9ybNM9jNYnR+HCYFMy9E64GpozWWMuLVUjYP+xHRt843+E5b7atx oqb02r7CI8sGyH6MNSgBSfrfE+Hhce722N7NE/FZltrH6tFaXirs6UokOvU8c8qeAd2i MwqlDofYtg1THYJNfxh8raXQ+g6d6DgF7A/CSpbSvdCwB6EaH+CqVdMpXLzOwFIGIzpN fnzQ== X-Gm-Message-State: ACrzQf2AS+tiisqRdffSfZIqHtbp//j46Lrg9mdyWU+I7Yn2MoX1iu5B NGzQ9FmYkRqLl5RIdohBVjc2Gj0oEh5SIAD53xY= X-Google-Smtp-Source: AMsMyM41CY5WsrIEPntlcDTGlK0B0oe2Gx0J2cKYHPimPXbJCsxSJCcW4CLE1TSrhiyg3zkQYoYhSKPntdy0NDMmxWc= X-Received: by 2002:a25:c8a:0:b0:6be:3680:94ac with SMTP id 132-20020a250c8a000000b006be368094acmr21132189ybm.293.1666423615256; Sat, 22 Oct 2022 00:26:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Max Filippov Date: Sat, 22 Oct 2022 00:26:43 -0700 Message-ID: Subject: Re: [PATCH v2] xtensa: Make register A0 allocable for the CALL0 ABI To: "Takayuki 'January June' Suwa" Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Oct 21, 2022 at 3:46 PM Takayuki 'January June' Suwa wrote: > > This patch offers an additional allocable register by RA for the CALL0 > ABI. > > > Register a0 holds the return address upon entry to a function, but > > unlike the windowed register ABI, it is not reserved for this purpose > > and may hold other values after the return address has been saved. > - Xtensa ISA Reference Manual, > 8.1.2 "CALL0 Register Usage and Stack Layout" [p.589] > > gcc/ChangeLog: > > * config/xtensa/xtensa.cc (xtensa_conditional_register_usage): > Remove register A0 from FIXED_REGS if the CALL0 ABI. > (xtensa_expand_epilogue): Change to emit '(use (reg:SI A0_REG))' > unconditionally after restoring callee-saved registers for > sibling-call functions, in order to prevent misleading that > register A0 is free to use. > --- > gcc/config/xtensa/xtensa.cc | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max