Skip to contentSkip to conversation

target-xtensa: AREG0 conversion

PATCH Superseded Max Filippov 1 participant 5 messages Jun 10, 2012

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover target-xtensa: AREG0 conversion

Changes in v2:
- add Peter's patch to this series
- rebase to the current master
- remove HELPER_CFLAGS from target-xtensa/Makefile.objs

Max Filippov (2):
target-xtensa: add attributes to helper functions
target-xtensa: switch to AREG0-free mode

Peter Portante (1):
target-xtensa: remove unnecessary include of dyngen-exec.h

 configure                   |    2 +-
 target-xtensa/helper.h      |   58 +++++++-------
 target-xtensa/op_helper.c   |  185 +++++++++++++++++++++----------------------
 target-xtensa/translate.c   |   64 ++++++++-------
 target-xtensa/xtensa-semi.c |    1 -
 5 files changed, 154 insertions(+), 156 deletions(-)
Signature · 1 line
1.7.7.6
#1 lore raw

PATCH v2 1/3 target-xtensa: remove unnecessary include of dyngen-exec.h

From: Peter Portante <[email protected]>

---
 target-xtensa/xtensa-semi.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
target-xtensa/xtensa-semi.c +0 -1
index b7c8c34..1c8a19e 100644
@@ -30,7 +30,6 @@
 #include <string.h>
 #include <stddef.h>
 #include "cpu.h"
-#include "dyngen-exec.h"
 #include "helper.h"
 #include "qemu-log.h"
 
Signature · 1 line
1.7.7.6
#2 lore raw

PATCH v2 2/3 target-xtensa: add attributes to helper functions

In reply to Max Filippov

Mark exception generating functions 'noreturn' and pure constant functions as such.

---
 target-xtensa/helper.h |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
target-xtensa/helper.h +8 -8
index 48a741e..9dd6f89 100644
@@ -1,12 +1,12 @@
 #include "def-helper.h"
 
-DEF_HELPER_1(exception, void, i32)
-DEF_HELPER_2(exception_cause, void, i32, i32)
-DEF_HELPER_3(exception_cause_vaddr, void, i32, i32, i32)
-DEF_HELPER_2(debug_exception, void, i32, i32)
+DEF_HELPER_1(exception, noreturn, i32)
+DEF_HELPER_2(exception_cause, noreturn, i32, i32)
+DEF_HELPER_3(exception_cause_vaddr, noreturn, i32, i32, i32)
+DEF_HELPER_2(debug_exception, noreturn, i32, i32)
 
-DEF_HELPER_1(nsa, i32, i32)
-DEF_HELPER_1(nsau, i32, i32)
+DEF_HELPER_FLAGS_1(nsa, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32)
+DEF_HELPER_FLAGS_1(nsau, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32)
 DEF_HELPER_1(wsr_windowbase, void, i32)
 DEF_HELPER_3(entry, void, i32, i32, i32)
 DEF_HELPER_1(retw, i32, i32)
@@ -25,8 +25,8 @@ DEF_HELPER_1(advance_ccount, void, i32)
 DEF_HELPER_1(check_interrupts, void, env)
 
 DEF_HELPER_1(wsr_rasid, void, i32)
-DEF_HELPER_2(rtlb0, i32, i32, i32)
-DEF_HELPER_2(rtlb1, i32, i32, i32)
+DEF_HELPER_FLAGS_2(rtlb0, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32)
+DEF_HELPER_FLAGS_2(rtlb1, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32)
 DEF_HELPER_2(itlb, void, i32, i32)
 DEF_HELPER_2(ptlb, i32, i32, i32)
 DEF_HELPER_3(wtlb, void, i32, i32, i32)
Signature · 1 line
1.7.7.6
#3 lore raw

PATCH v2 3/3 target-xtensa: switch to AREG0-free mode

In reply to Max Filippov

Add env parameter to every helper function that needs it, update 'configure' script.

---
 configure                 |    2 +-
 target-xtensa/helper.h    |   54 +++++++-------
 target-xtensa/op_helper.c |  185 ++++++++++++++++++++++-----------------------
 target-xtensa/translate.c |   64 ++++++++-------
 4 files changed, 152 insertions(+), 153 deletions(-)
configure +1 -1
index 0ecb55f..dd0d2b3 100755
@@ -3675,7 +3675,7 @@ symlink "$source_path/Makefile.target" "$target_dir/Makefile"
 
 
 case "$target_arch2" in
-  alpha | sparc*)
+  alpha | sparc* | xtensa*)
     echo "CONFIG_TCG_PASS_AREG0=y" >> $config_target_mak
   ;;
 esac
target-xtensa/helper.h +27 -27

66 lines not on this page · raw message

target-xtensa/op_helper.c +90 -95

464 lines not on this page · raw message

target-xtensa/translate.c +34 -30

230 lines not on this page · raw message

Signature · 1 line
1.7.7.6
#4 lore raw
In reply to Max Filippov
Quoted 4 lines · Max Filippov

Changes in v2:
- add Peter's patch to this series
- rebase to the current master
- remove HELPER_CFLAGS from target-xtensa/Makefile.objs

Grrr, sent from wrong directory, sorry. v3 to come.

Quoted 17 lines

Max Filippov (2):
 target-xtensa: add attributes to helper functions
 target-xtensa: switch to AREG0-free mode

Peter Portante (1):
 target-xtensa: remove unnecessary include of dyngen-exec.h

 configure                   |    2 +-
 target-xtensa/helper.h      |   58 +++++++------- target-xtensa/op_helper.c   |  185 +++++++++++++++++++++---------------------- target-xtensa/translate.c   |   64 ++++++++------- target-xtensa/xtensa-semi.c |    1 -

 5 files changed, 154 insertions(+), 156 deletions(-)

--
1.7.7.6

Signature · 2 lines
Thanks.
-- Max