-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TriCore Support #1568
TriCore Support #1568
Conversation
python sample
Correct attribution
Fixed byte code to execute properly.
Removed testing artifact
I do not have a windows machine to target, but I must have missed some configuration parameters to target arm64 and android. Seems the above TriCore and s390x may be a hardcoded value or missed auto configuration in an enumeration somewhere. Any thoughts? |
You have to somehow grab an MSVC to test it or just push to your branch and our CI would help you do so. I would have a review ASAP. |
You are failing CI because you don't add the corresponding header in msvc/ directory. The PR itself looks good to me but the CI needs to be fixed. |
Adding the config-target.h file in the TriCore softmmu didn't seem to resolve the problem. I'll keep combing through the build environment. |
Use built in crc32
There is a problem, most likely in translate.c, in handling parsing of small snippets of code, i.e., only one block of emulated code. I'm looking into it, but works fine with multi-block inputs. This means the samples do not currently work. The lines of assembly are iterated over, but the register states are not published properly while exiting. If the PR is fine, I can submit a bug fix afterwards. |
@uberwoozle nice work! |
Hello, the |
The intention was for it to work, you are referring to Update: |
Wait CI to be green ;) |
Merged, thanks! |
Works when tricore is built alone.
Run into issue where when building all targets tricore switches to s390x when entering 'tb_gen_code_tricore'.
#0 0x00007ffff513beab in memory_mapping (uc=0xa00000073, address=14899176) at /unicorn/uc.c:1492
#1 0x00007ffff5f613ec in load_helper (env=0xc2a930, addr=14899176, oi=147, retaddr=0, op=MO_BEUW, code_read=true, full_load=0x7ffff5f6bead <full_lduw_code>) at /unicorn/qemu/accel/tcg/cputlb.c:1439
#2 0x00007ffff5f6bef7 in full_lduw_code (env=0xc2a930, addr=14899176, oi=147, retaddr=0) at /unicorn/qemu/accel/tcg/cputlb.c:2389
#3 0x00007ffff5f6bf49 in cpu_lduw_code_s390x (env=0xc2a930, addr=14899176) at /unicorn/qemu/accel/tcg/cputlb.c:2395
#4 0x00007ffff5f99a11 in ld_code2 (env=0xc2a930, pc=14899176) at /unicorn/qemu/target/s390x/translate.c:385
#5 0x00007ffff5fba5f1 in extract_insn (env=0xc2a930, s=0x7fffffffcf60) at /unicorn/qemu/target/s390x/translate.c:6547
#6 0x00007ffff5fba8cb in translate_one (env=0xc2a930, s=0x7fffffffcf60) at /unicorn/qemu/target/s390x/translate.c:6679
#7 0x00007ffff5fbb0b5 in s390x_tr_translate_insn (dcbase=0x7fffffffcf60, cs=0xc22200) at /unicorn/qemu/target/s390x/translate.c:6877
#8 0x00007ffff5fd8278 in translator_loop_s390x (ops=0x7ffff63d9840 <s390x_tr_ops>, db=0x7fffffffcf60, cpu=0xc22200, tb=0x7fffb4be2040, max_insns=512) at /unicorn/qemu/accel/tcg/translator.c:124
#9 0x00007ffff5fbb2a3 in gen_intermediate_code (cs=0xc22200, tb=0x7fffb4be2040, max_insns=512) at /unicorn/qemu/target/s390x/translate.c:6944
#10 0x00007ffff4cfe614 in tb_gen_code_tricore (cpu=0xc22200, pc=2162382824, cs_base=0, flags=0, cflags=-16777216) at /unicorn/qemu/accel/tcg/translate-all.c:1623
#11 0x00007ffff4ce7a4f in tb_find (cpu=0xc22200, last_tb=0x0, tb_exit=0, cf_mask=0) at /unicorn/qemu/accel/tcg/cpu-exec.c:256
#12 0x00007ffff4ce82c9 in cpu_exec_tricore (uc=0xbf74d0, cpu=0xc22200) at /unicorn/qemu/accel/tcg/cpu-exec.c:597
#13 0x00007ffff4c96616 in tcg_cpu_exec (uc=0xbf74d0) at /unicorn/qemu/softmmu/cpus.c:96
#14 0x00007ffff4c9689f in resume_all_vcpus_tricore (uc=0xbf74d0) at /unicorn/qemu/softmmu/cpus.c:209
#15 0x00007ffff4c96937 in vm_start_tricore (uc=0xbf74d0) at /unicorn/qemu/softmmu/cpus.c:228
#16 0x00007ffff513ab83 in uc_emu_start (uc=0xbf74d0, begin=2162382824, until=0, timeout=0, count=1) at /unicorn/uc.c:857