i've been working on a new architecture port, but i cant quite figure out some of the intricacies from reading the code. i have all the simple stuff working for linux-user (register moves, immediate moves, loads, stores, syscall emulation) and want to move on to the next big piece -- code flow changes.
i cant quite figure out the difference between DISAS_TB_JUMP and DISAS_JUMP. the exec-all.h header says one is for "only pc was modified dynamically" while the other is "only pc was modified statically". is this referring to conditional vs unconditional jumps ? or is this referring to direct vs indirect jumps ? conditional: if cc jump 1f; unconditional: jump 1f; direct: jump foo; indirect: P0 = [SP++]; jump (P0); along these lines, when should i be using gen_new_label, gen_set_label, tcg_gen_brcond*, and tcg_gen_setcond* ? should they only be used with conditional code ? or should unconditional jumps be generating labels too ? for conditional register assignments, i think i should be using these too. so something like: if CC R0 = R1; should turn into: l = gen_new_label(); tcg_gen_brcondi_tl(TCG_COND_NE, cpu_cc, T, l); tcg_gen_mov_tl(reg_dst, reg_src); gen_set_label(l); and i dont need to flag this bit of code as a jump (e.g. DISAS_JUMP) ... also, having gone through the ops already available in tcg-op.h, ive managed to decode what they do except for these: tcg_gen_{ld,st}{8,16,32}{u,s} i thought originally they were for handling load/store insns, but they didnt work for me, and then i found the tcg_gen_qemu_{ld,st}* ops. so what is the point of these ones ? -mike