Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WIP: tcg: add xtensa
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
jcmvbkbc committed May 15, 2016
1 parent bfc766d commit 5360428
Show file tree
Hide file tree
Showing 7 changed files with 2,334 additions and 2 deletions.
4 changes: 3 additions & 1 deletion configure
Expand Up @@ -506,6 +506,8 @@ elif check_define __aarch64__ ; then
cpu="aarch64"
elif check_define __hppa__ ; then
cpu="hppa"
elif check_define __xtensa__ ; then
cpu="xtensa"
else
cpu=`uname -m`
fi
Expand All @@ -514,7 +516,7 @@ ARCH=
# Normalise host CPU name and set ARCH.
# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
ia64|ppc|ppc64|s390|s390x|sparc64|x32)
ia64|ppc|ppc64|s390|s390x|sparc64|x32|xtensa)
cpu="$cpu"
;;
i386|i486|i586|i686|i86pc|BePC)
Expand Down
4 changes: 4 additions & 0 deletions include/elf.h
Expand Up @@ -1231,6 +1231,10 @@ typedef struct {
#define R_IA64_DTPREL64LSB 0xb7 /* @dtprel(sym + add), data8 LSB */
#define R_IA64_LTOFF_DTPREL22 0xba /* @ltoff(@dtprel(s+a)), imm22 */

/* Xtensa-specific declarations. */

#define R_XTENSA_NONE 0

typedef struct elf32_rel {
Elf32_Addr r_offset;
Elf32_Word r_info;
Expand Down
3 changes: 2 additions & 1 deletion include/exec/exec-all.h
Expand Up @@ -229,6 +229,7 @@ static inline void tlb_flush_by_mmuidx(CPUState *cpu, ...)
|| defined(__sparc__) || defined(__aarch64__) \
|| defined(__s390x__) || defined(__mips__) \
|| defined(CONFIG_TCG_INTERPRETER)
// || defined(__xtensa__)
#define USE_DIRECT_JUMP
#endif

Expand Down Expand Up @@ -350,7 +351,7 @@ static inline void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr)
__asm __volatile__ ("swi 0x9f0002" : : "r" (_beg), "r" (_end), "r" (_flg));
#endif
}
#elif defined(__sparc__) || defined(__mips__)
#elif defined(__sparc__) || defined(__mips__) || defined(__xtensa__)
void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr);
#else
#error tb_set_jmp_target1 is missing
Expand Down
474 changes: 474 additions & 0 deletions tcg/xtensa/core-isa.h

Large diffs are not rendered by default.

0 comments on commit 5360428

Please sign in to comment.