Skip to content

Commit

Permalink
Xtensa: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jun 7, 2024
1 parent 554f6cf commit c732ca6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions suite/cstest/include/factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ char *get_detail_bpf(csh *handle, cs_mode mode, cs_insn *ins);
char *get_detail_tricore(csh *handle, cs_mode mode, cs_insn *ins);
char *get_detail_alpha(csh *handle, cs_mode mode, cs_insn *ins);
char *get_detail_hppa(csh *handle, cs_mode mode, cs_insn *ins);
char *get_detail_xtensa(csh *p_handle, cs_mode mode, cs_insn *ins);

#endif /* FACTORY_H */
3 changes: 3 additions & 0 deletions suite/cstest/src/capstone_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ int set_function(int arch)
case CS_ARCH_HPPA:
function = get_detail_hppa;
break;
case CS_ARCH_XTENSA:
function = get_detail_xtensa;
break;
default:
return -1;
}
Expand Down
1 change: 1 addition & 0 deletions suite/cstest/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ static single_dict arches[] = {
{"CS_ARCH_TRICORE", CS_ARCH_TRICORE},
{"CS_ARCH_ALPHA", CS_ARCH_ALPHA},
{"CS_ARCH_HPPA", CS_ARCH_HPPA},
{"CS_ARCH_XTENSA", CS_ARCH_XTENSA},
};

static single_dict modes[] = {
Expand Down
7 changes: 7 additions & 0 deletions suite/cstest/src/xtensa_detail.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "factory.h"

char *get_detail_xtensa(csh *p_handle, cs_mode mode, cs_insn *ins)
{
char *result = NULL;
return result;
}
7 changes: 6 additions & 1 deletion suite/fuzz/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,12 @@ struct platform platforms[] = {
"TRICORE",
"tc162"
},

{
CS_ARCH_XTENSA,
CS_MODE_LITTLE_ENDIAN,
"XTENSA",
"xtensa"
},
// dummy entry to mark the end of this array.
// DO NOT DELETE THIS
{
Expand Down

0 comments on commit c732ca6

Please sign in to comment.