Thank you so much for your help Peter. I was using version 0.15.1. On 1.0,
it works like a dream!

I was not talking about semantics of individual instructions but semantics
of the whole multi-threaded program. Multi-threaded programs can lead to
several different (most of which are unintended) states of the CPU. What
states are possible is described in a mathematically rigorous definition of
the ARM memory model. My task is to implement this memory model over TCG
ops and then compare the results on several different (multi-threaded)
litmus tests with the implementation of the memory model over ARM
instructions. For the same task, I need QEMU to give me the TCG translation
for code which it never branches into and hence, never needs to translate
and execute (because ARM multiprocessors can perform speculative execution).

Rajat.

On Tue, Jan 17, 2012 at 8:33 AM, Peter Maydell <peter.mayd...@linaro.org>wrote:

> On 17 January 2012 01:04, 陳韋任 <che...@iis.sinica.edu.tw> wrote:
> >> > What is the way out of this? The reason I need TCG code is because my
> >> > project work is to write a semantics for TCG micro-operations and then
> >> > compare my semantics with a semantics for ARM instructions being
> written by
> >> > someone else. To test my semantics, I need the corresponding TCG code
> for
> >> > several different multi-threaded ARM binaries.
> >>
> >> Why does this have to be a multi-threaded binary? In the multithreaded
> >> case, the instructions executed by QEMU won't be deterministic (it will
> >> depend on how the host OS schedules the multiple threads) so it's going
> >> to be hard to compare a long trace output to something else.
> >
> >  I guess Rajat's goal is to compare the "semantics" of TCG ops and ARM
> binary,
> > therefore the non-deterministic might not be the issue. Or he want to use
> > "semantics" to solve the non-deterministic problem.
>
> But if you're looking at the semantics at a level where you don't
> care about the non-determinism of the threading, you might just
> as well look at them at an individual instruction or TB level,
> in which case a single threaded program is just as good and less
> confusing, surely?
>
> -- PMM
>



-- 
Rajat Goyal
5th year undergraduate student
Integrated Master of Technology
Mathematics and Computing
Department of Mathematics
IIT Delhi

Reply via email to