From patchwork Tue Nov 23 17:37:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1558661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hmcqVU1t; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HzBFb6ydvz9t1Q for ; Wed, 24 Nov 2021 04:38:43 +1100 (AEDT) Received: from localhost ([::1]:56890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpZkf-0003zX-0o for incoming@patchwork.ozlabs.org; Tue, 23 Nov 2021 12:38:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpZk9-0003xt-7g for qemu-devel@nongnu.org; Tue, 23 Nov 2021 12:38:09 -0500 Received: from [2a00:1450:4864:20::42a] (port=35652 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpZk7-0004zO-TT for qemu-devel@nongnu.org; Tue, 23 Nov 2021 12:38:08 -0500 Received: by mail-wr1-x42a.google.com with SMTP id i5so40358502wrb.2 for ; Tue, 23 Nov 2021 09:38:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=npTV63kmQYBDZvVZZRKo6vQ+WQa403g9CWt7bYXbgz0=; b=hmcqVU1tcSwG9ThiJHTiOs3CT/fGG3XjrzF1q4l73h0KxxMtGSkDWnJkcipsFkhSC6 WyZpw0tbkypu3Y4MD3qkCeYyBx1icJpAlkwpgI1CKwqmyaiqtH+jir1EVxLSEvhIFhja L0e/dFkEnyhRXpv5UUDubCTd/njNAOKIuaHfbaHwKv3gOIaEMoDthRegtzUsOqJQCIKV 2GqQbPQwq+pYFfiCJElLHCOdJ+VUiPo7p2As6jYFRYlSdMY2aqEXGazFp0J4pqlQkkyM Rzf3b9Z8oBczoKLFKlaxTvv6/0lkXPLeySpBygg5ghkkCpzM220zRw/k2usjATec4DYz oKWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=npTV63kmQYBDZvVZZRKo6vQ+WQa403g9CWt7bYXbgz0=; b=GPAF+IKVkOkB/fbSFu+brvnwZ2V1zv2DKw4JdWwd37kahA1m/1+9B4olcsZEL9WDSn zohxCK/VytMn6b6DwX9WJoIUs34kFUCKyjPbGDtsk8tNrfJsjPGxY8GklHv5tAZRt1wv DGk1UmpmOfctnG0mAPtx7fno6JDFvLCVsC3zvhxQ7fuuK4O9X8yZgMVDrvLvdo6jS7sn B5vH8SUwoOlDIxAPBG5xbHNCW878c/pAaVmjJKQCrvnHrQfDL5y5ZPOCLh3RV6hTypak +/2izlbcjEGcLK+YR/3vvX7FILgCB5g5IRVvePTJkET4N3lQMjAleIwSnk3u/ZK5pi/d /Qug== X-Gm-Message-State: AOAM5330/KJnzwqiLkGMIwBqFKCac2kw+NXN5ovNAvfTGj0Fpo/IfXkc zlBV+twzbFU2bnyyuEZhAexu3HONY9wumxFSbTw= X-Google-Smtp-Source: ABdhPJzg4N8rHybRJhu/HVzrPCo4mdN8iHePM5qpn6hRhUbRtOzQAeBsy4wvKwACFvTIS3EGtxr2sA== X-Received: by 2002:a05:6000:168e:: with SMTP id y14mr8102087wrd.331.1637689086593; Tue, 23 Nov 2021 09:38:06 -0800 (PST) Received: from cloudburst.home (149.164.14.37.dynamic.jazztel.es. [37.14.164.149]) by smtp.gmail.com with ESMTPSA id n13sm13054883wrt.44.2021.11.23.09.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 09:38:06 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 02/16] linux-user/host/ppc64: Use r11 for signal_pending address Date: Tue, 23 Nov 2021 18:37:45 +0100 Message-Id: <20211123173759.1383510-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211123173759.1383510-1-richard.henderson@linaro.org> References: <20211123173759.1383510-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu, imp@bsdimp.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We don't need a register that can live across the syscall; we only need a register that can live until the syscall. Use call-clobbered r11 instead of call-saved r14. Eliminate the save and restore of r14 from the stack frame. Signed-off-by: Richard Henderson --- linux-user/host/ppc64/safe-syscall.inc.S | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/linux-user/host/ppc64/safe-syscall.inc.S b/linux-user/host/ppc64/safe-syscall.inc.S index 4b57440585..5f19cd193c 100644 --- a/linux-user/host/ppc64/safe-syscall.inc.S +++ b/linux-user/host/ppc64/safe-syscall.inc.S @@ -49,9 +49,7 @@ safe_syscall_base: * and returns the result in r3 * Shuffle everything around appropriately. */ - std 14, 16(1) /* Preserve r14 in SP+16 */ - .cfi_offset 14, 16 - mr 14, 3 /* signal_pending */ + mr 11, 3 /* signal_pending */ mr 0, 4 /* syscall number */ mr 3, 5 /* syscall arguments */ mr 4, 6 @@ -69,13 +67,12 @@ safe_syscall_base: */ safe_syscall_start: /* if signal_pending is non-zero, don't do the call */ - lwz 12, 0(14) + lwz 12, 0(11) cmpwi 0, 12, 0 bne- 0f sc safe_syscall_end: /* code path when we did execute the syscall */ - ld 14, 16(1) /* restore r14 to its original value */ bnslr+ /* syscall failed; return negative errno */ @@ -84,7 +81,6 @@ safe_syscall_end: /* code path when we didn't execute the syscall */ 0: addi 3, 0, -TARGET_ERESTARTSYS - ld 14, 16(1) /* restore r14 to its original value */ blr .cfi_endproc