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: 519320 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp8973825imj; Tue, 23 Nov 2021 09:39:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbkSb399DfRTcgG0v+pxlcbfm2GrHaYf3PJ4Oj/h9VLBJvDCktecGqsIIVmnMmBFtGbaPk X-Received: by 2002:a05:6122:920:: with SMTP id j32mr13605793vka.13.1637689147037; Tue, 23 Nov 2021 09:39:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637689147; cv=none; d=google.com; s=arc-20160816; b=B2EBsSza0S3FvA/5Q4l6LfriqDm+xHVcRA1nzCIEioAHlrh/ehBXH5ZbcCIYz+MxgK jngCEowFwEB1SK1UAWckzw4DCclZVHv5mYxRzBgbYh23xk6aY7nu8Snea0Wu1b/0Pqp/ sX814fNH0Krx7Trug8dYs88k+c6LsyfI6WeIhA9DJJwXEF/j0o9XIE+rVKq9Bx3+xvpA vL2fdKZ0n6H6Nek3AFapILGg1eNJy6ooRdvzcMla/jm/dNuR0kKGn9LeP4bXcc/TA5lL Ce5UOZZqsmbQZMPolPaDXQc87nhy8fVr7afCr5evaRVsYvH23UA5saeVwVX+VNiU2Iuv qJIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=npTV63kmQYBDZvVZZRKo6vQ+WQa403g9CWt7bYXbgz0=; b=W5sOeXNtm/cFPyMqi4E4AbdjddkgId5ul371JLrrx8j43DbTPEGokj9bKHzSqDh1cn Gtqe91ULvt5TsvOtzLLmAbeec5Ey5wk4Nq7gNTl465wOTwSAAqf9/NGAAj621tU9ir6Z cIXbt2zT/9B3acblydJAGbHZRyBSkIPiz5JEknCASdjYiTvn1c9ZEA8/2p/elqp8A1Xc tvuSE9Jq9KfRWQtslWkLDvWj2JQRXIaepCnavSInLF9sWjMlnrzhKMpoHS/QhcIoaNr8 1hsRCEyeYNVtfWMIxPjq592eEGR+b8Wd219CBYJa6Hk1KL/TxET9BlbQWJCkOk9OyAkT 5nQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hmcqVU1t; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ba10si5494209uab.35.2021.11.23.09.39.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Nov 2021 09:39:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hmcqVU1t; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpZl4-0003zX-GS for patch@linaro.org; Tue, 23 Nov 2021 12:39:06 -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-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+patch=linaro.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