From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoxbj-0006T4-8V for qemu-devel@nongnu.org; Wed, 21 Oct 2015 13:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoxbe-0006sj-Cj for qemu-devel@nongnu.org; Wed, 21 Oct 2015 13:55:27 -0400 Received: from e19.ny.us.ibm.com ([129.33.205.209]:57989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoxbe-0006sW-76 for qemu-devel@nongnu.org; Wed, 21 Oct 2015 13:55:22 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Oct 2015 13:55:21 -0400 From: Michael Roth Date: Wed, 21 Oct 2015 12:51:35 -0500 Message-Id: <1445449930-23525-6-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1445449930-23525-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1445449930-23525-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 05/40] exec-all: Translate TCI return addresses backwards too List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Roth , Stefan Weil , Peter Crosthwaite , qemu-stable@nongnu.org, Peter Crosthwaite From: Peter Crosthwaite This subtraction of return addresses applies directly to TCI as well as host-TCG. This fixes Linux boots for at least Microblaze, CRIS, ARM and SH4 when using TCI. [sw: Removed indentation for preprocessor statement] [sw: The patch also fixes Linux boot for x86_64] Reviewed-by: Richard Henderson Signed-off-by: Stefan Weil Signed-off-by: Peter Crosthwaite (cherry picked from commit a17d448274575efbfcc1c04ec2641a0afeb74e17) Signed-off-by: Michael Roth --- include/exec/exec-all.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index a6fce04..60f12bc 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -308,11 +308,7 @@ extern uintptr_t tci_tb_ptr; to indicate the compressed mode; subtracting two works around that. It is also the case that there are no host isas that contain a call insn smaller than 4 bytes, so we don't worry about special-casing this. */ -#if defined(CONFIG_TCG_INTERPRETER) -# define GETPC_ADJ 0 -#else -# define GETPC_ADJ 2 -#endif +#define GETPC_ADJ 2 #define GETPC() (GETRA() - GETPC_ADJ) -- 1.9.1