]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
exec-all: Translate TCI return addresses backwards too
authorPeter Crosthwaite <crosthwaitepeter@gmail.com>
Tue, 18 Aug 2015 03:28:18 +0000 (20:28 -0700)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sat, 17 Oct 2015 23:15:48 +0000 (18:15 -0500)
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 <rth@twiddle.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
(cherry picked from commit a17d448274575efbfcc1c04ec2641a0afeb74e17)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
include/exec/exec-all.h

index a6fce04f651e91b4d4a94e820fe07a7274bed113..60f12bc65cc7d1b275e164e7447f7fd285da2f88 100644 (file)
@@ -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)