Hi, I've been patching TCG for my own purposes recently and I was
wondering a few things. That being:
- Is the TCG backend expected to handle bad cases for instructions? I
was wondering as I found a situation where a very large shift constant
reaches the backend and causes an illegal instruction to be generated.
Is the frontend expected to clean this up, or is the backend supposed to
be able to deal with these? I currently patched the bug via clipping the
shift constant between 0 and 64.
- I've been implementing an instruction scheduler(list scheduler, with
priority given to most successors) for TCG and currently if I replace
instructions in s->ops(the TCG context) I get a crash later in
tcg_reg_alloc_op, even if the instruction stream is identical. Is there
anything else I need to move when I do this?
- Is insn_start necessary to have in order(and what does it do?)? These
currently are serializing instructions in my scheduler and significantly
limit my reordering as they create lots of dependencies every few
instructions.
- Is it "okay" to use g2h and h2g directly in code in syscall.c?
Currently it seems like TYPE_PTRVOID doesn't do this conversion, and as
such, most of the calls made over the guest-host barrier made by DRM
seem to fail spectacularly across bittedness lines. I think a more ideal
solution would be implementing types that do this automatically, so I
don't have to deal with the difference in struct size using macros, but
in the short term I don't really have another option.
My last email didn't seem to reach you all, but here's to hoping this
one does. Thanks!
- [RFC] Various questions about TCG implementation, D... Catherine A. Frederick
-