exec-all: Translate TCI return addresses backwards too
PATCH 1/1 exec-all: Translate TCI return addresses backwards too
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.
---
Changed since v1:
Wrote commit message.
--- include/exec/exec-all.h | 4 ---- 1 file changed, 4 deletions(-)
include/exec/exec-all.h +0 -4
@@ -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 () (GETRA() - GETPC_ADJ)
Signature · 1 line
1.9.1
Quoted 20 lines · 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.
Reviewed-by Richard Henderson <[email protected]>Signed-off-by Peter Crosthwaite <[email protected]>---
Changed since v1:
Wrote commit message.--- include/exec/exec-all.h | 4 ---- 1 file changed, 4 deletions(-)include/exec/exec-all.h +0
-0@@ -308,11 +308,7 @@ extern uintptr_t tci_tb_ptr; to indicate the compressed mode; subtracting two works around that. It
include/exec/exec-all.h extern uintptr_t tci_tb_ptr; · line 314
Quoted 10 lines
include/exec/exec-all.h +0
-4is 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 () (GETRA() - GETPC_ADJ)
Am 18.08.2015 um 05:28 schrieb Peter Crosthwaite:
Quoted 18 lines
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.
Reviewed-by Richard Henderson <[email protected]>Signed-off-by Peter Crosthwaite <[email protected]>---
Changed since v1:
Wrote commit message.--- include/exec/exec-all.h | 4 ---- 1 file changed, 4 deletions(-)include/exec/exec-all.h +0
-0
include/exec/exec-all.h extern uintptr_t tci_tb_ptr; · line 313
Quoted 10 lines
include/exec/exec-all.h +0
-4@@ -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 () (GETRA() - GETPC_ADJ)
Who should send the pull request? Me because it is TCI related? I won't be able to send one before next week.
I also suggest to remove the indentation which is no longer useful:
#define GETPC_ADJ 2
instead of
# define GETPC_ADJ 2
Maybe this can be done by the person who requests the pull.
Stefan