Update Java samples to match C samples.

Also add all of the samples as Java tests, referencing the output of the C
samples.
This commit is contained in:
Robert Xiao
2023-05-14 16:23:49 -07:00
parent 3739c7e3e0
commit 4f563490e2
25 changed files with 3884 additions and 906 deletions

View File

@@ -9,7 +9,7 @@
#include <string.h>
// code to be emulated
#define CODE "\x82\x11\xbb\x00\x00\x08" // mov d0, #0x1; mov.u d0, #0x8000
#define CODE "\x82\x11\xbb\x00\x00\x08" // mov d1, #0x1; mov.u d0, #0x8000
// memory address where emulation starts
#define ADDRESS 0x10000
@@ -36,6 +36,7 @@ static void test_tricore(void)
uc_hook trace1, trace2;
uint32_t d0 = 0x0; // d0 register
uint32_t d1 = 0x0; // d1 register
printf("Emulate TriCore code\n");
@@ -73,6 +74,9 @@ static void test_tricore(void)
uc_reg_read(uc, UC_TRICORE_REG_D0, &d0);
printf(">>> d0 = 0x%x\n", d0);
uc_reg_read(uc, UC_TRICORE_REG_D1, &d1);
printf(">>> d1 = 0x%x\n", d1);
uc_close(uc);
}