On Sun, 24 Feb 2019 at 19:37, Stephen Checkoway <stephen.checko...@oberlin.edu> wrote: > I think that something about adding the tcg_gen_brcond_tl is causing values > to become dead and then qemu aborts.
Yep -- all "TCG temporaries" are dead at the end of a basic block, and brcond ends a basic block. Only globals and "local temporaries" stay live across brcond. This is documented in tcg/README, though it doesn't spell it out very explicitly. This makes brcond pretty painful to use and almost impossible to introduce into the middle of some existing sequence of generated code. I haven't looked at what the best way to do what you're trying to do here is, though. By the way, don't do this: + dc->A1 = tcg_temp_new(); The current use of a small number of tcg temps in the i386 translate.c code is an antipattern that is a relic from a very old version of the code. It's much better to simply create new temporaries in the code at the point where you need them and then free them once you're done. thanks -- PMM