1bb2e0039SLluís Vilanova /* 2bb2e0039SLluís Vilanova * Generic intermediate code generation. 3bb2e0039SLluís Vilanova * 4bb2e0039SLluís Vilanova * Copyright (C) 2016-2017 Lluís Vilanova <vilanova@ac.upc.edu> 5bb2e0039SLluís Vilanova * 6bb2e0039SLluís Vilanova * This work is licensed under the terms of the GNU GPL, version 2 or later. 7bb2e0039SLluís Vilanova * See the COPYING file in the top-level directory. 8bb2e0039SLluís Vilanova */ 9bb2e0039SLluís Vilanova 10bb2e0039SLluís Vilanova #include "qemu/osdep.h" 11653c46daSRichard Henderson #include "qemu/log.h" 12bb2e0039SLluís Vilanova #include "qemu/error-report.h" 13bb2e0039SLluís Vilanova #include "exec/exec-all.h" 14bb2e0039SLluís Vilanova #include "exec/translator.h" 156ba6f818SEmilio G. Cota #include "exec/plugin-gen.h" 16653c46daSRichard Henderson #include "tcg/tcg-op-common.h" 174c268d6dSPhilippe Mathieu-Daudé #include "internal-target.h" 1856234233SRichard Henderson 190ca41ccfSRichard Henderson static void set_can_do_io(DisasContextBase *db, bool val) 2056234233SRichard Henderson { 210ca41ccfSRichard Henderson if (db->saved_can_do_io != val) { 220ca41ccfSRichard Henderson db->saved_can_do_io = val; 23464dacf6SRichard Henderson 24464dacf6SRichard Henderson QEMU_BUILD_BUG_ON(sizeof_field(CPUState, neg.can_do_io) != 1); 25ad75a51eSRichard Henderson tcg_gen_st8_i32(tcg_constant_i32(val), tcg_env, 26464dacf6SRichard Henderson offsetof(ArchCPU, parent_obj.neg.can_do_io) - 2756234233SRichard Henderson offsetof(ArchCPU, env)); 2856234233SRichard Henderson } 290ca41ccfSRichard Henderson } 3056234233SRichard Henderson 31dfd1b812SRichard Henderson bool translator_io_start(DisasContextBase *db) 32dfd1b812SRichard Henderson { 330ca41ccfSRichard Henderson set_can_do_io(db, true); 34dfd1b812SRichard Henderson 35dfd1b812SRichard Henderson /* 36dfd1b812SRichard Henderson * Ensure that this instruction will be the last in the TB. 37dfd1b812SRichard Henderson * The target may override this to something more forceful. 38dfd1b812SRichard Henderson */ 39dfd1b812SRichard Henderson if (db->is_jmp == DISAS_NEXT) { 40dfd1b812SRichard Henderson db->is_jmp = DISAS_TOO_MANY; 41dfd1b812SRichard Henderson } 42dfd1b812SRichard Henderson return true; 43dfd1b812SRichard Henderson } 44dfd1b812SRichard Henderson 450ca41ccfSRichard Henderson static TCGOp *gen_tb_start(DisasContextBase *db, uint32_t cflags) 4656234233SRichard Henderson { 47f47a90daSRichard Henderson TCGv_i32 count = NULL; 4856234233SRichard Henderson TCGOp *icount_start_insn = NULL; 4956234233SRichard Henderson 50f47a90daSRichard Henderson if ((cflags & CF_USE_ICOUNT) || !(cflags & CF_NOIRQ)) { 51f47a90daSRichard Henderson count = tcg_temp_new_i32(); 52ad75a51eSRichard Henderson tcg_gen_ld_i32(count, tcg_env, 533b3d7df5SRichard Henderson offsetof(ArchCPU, parent_obj.neg.icount_decr.u32) 543b3d7df5SRichard Henderson - offsetof(ArchCPU, env)); 55f47a90daSRichard Henderson } 5656234233SRichard Henderson 5756234233SRichard Henderson if (cflags & CF_USE_ICOUNT) { 5856234233SRichard Henderson /* 5956234233SRichard Henderson * We emit a sub with a dummy immediate argument. Keep the insn index 6056234233SRichard Henderson * of the sub so that we later (when we know the actual insn count) 6156234233SRichard Henderson * can update the argument with the actual insn count. 6256234233SRichard Henderson */ 6356234233SRichard Henderson tcg_gen_sub_i32(count, count, tcg_constant_i32(0)); 6456234233SRichard Henderson icount_start_insn = tcg_last_op(); 6556234233SRichard Henderson } 6656234233SRichard Henderson 6756234233SRichard Henderson /* 6856234233SRichard Henderson * Emit the check against icount_decr.u32 to see if we should exit 6956234233SRichard Henderson * unless we suppress the check with CF_NOIRQ. If we are using 7056234233SRichard Henderson * icount and have suppressed interruption the higher level code 7156234233SRichard Henderson * should have ensured we don't run more instructions than the 7256234233SRichard Henderson * budget. 7356234233SRichard Henderson */ 7456234233SRichard Henderson if (cflags & CF_NOIRQ) { 7556234233SRichard Henderson tcg_ctx->exitreq_label = NULL; 7656234233SRichard Henderson } else { 7756234233SRichard Henderson tcg_ctx->exitreq_label = gen_new_label(); 7856234233SRichard Henderson tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); 7956234233SRichard Henderson } 8056234233SRichard Henderson 8156234233SRichard Henderson if (cflags & CF_USE_ICOUNT) { 82ad75a51eSRichard Henderson tcg_gen_st16_i32(count, tcg_env, 833b3d7df5SRichard Henderson offsetof(ArchCPU, parent_obj.neg.icount_decr.u16.low) 843b3d7df5SRichard Henderson - offsetof(ArchCPU, env)); 8518a536f1SRichard Henderson } 8618a536f1SRichard Henderson 8756234233SRichard Henderson /* 88464dacf6SRichard Henderson * cpu->neg.can_do_io is set automatically here at the beginning of 8918a536f1SRichard Henderson * each translation block. The cost is minimal, plus it would be 9018a536f1SRichard Henderson * very easy to forget doing it in the translator. 9156234233SRichard Henderson */ 92a2f99d48SRichard Henderson set_can_do_io(db, db->max_insns == 1 && (cflags & CF_LAST_IO)); 9356234233SRichard Henderson 9456234233SRichard Henderson return icount_start_insn; 9556234233SRichard Henderson } 9656234233SRichard Henderson 9756234233SRichard Henderson static void gen_tb_end(const TranslationBlock *tb, uint32_t cflags, 9856234233SRichard Henderson TCGOp *icount_start_insn, int num_insns) 9956234233SRichard Henderson { 10056234233SRichard Henderson if (cflags & CF_USE_ICOUNT) { 10156234233SRichard Henderson /* 10256234233SRichard Henderson * Update the num_insn immediate parameter now that we know 10356234233SRichard Henderson * the actual insn count. 10456234233SRichard Henderson */ 10556234233SRichard Henderson tcg_set_insn_param(icount_start_insn, 2, 10656234233SRichard Henderson tcgv_i32_arg(tcg_constant_i32(num_insns))); 10756234233SRichard Henderson } 10856234233SRichard Henderson 10956234233SRichard Henderson if (tcg_ctx->exitreq_label) { 11056234233SRichard Henderson gen_set_label(tcg_ctx->exitreq_label); 11156234233SRichard Henderson tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); 11256234233SRichard Henderson } 11356234233SRichard Henderson } 11456234233SRichard Henderson 115b1c09220SAnton Johansson bool translator_use_goto_tb(DisasContextBase *db, vaddr dest) 116d3a2a1d8SRichard Henderson { 11784f15616SRichard Henderson /* Suppress goto_tb if requested. */ 11884f15616SRichard Henderson if (tb_cflags(db->tb) & CF_NO_GOTO_TB) { 11984f15616SRichard Henderson return false; 12084f15616SRichard Henderson } 12184f15616SRichard Henderson 122d3a2a1d8SRichard Henderson /* Check for the dest on the same page as the start of the TB. */ 123d3a2a1d8SRichard Henderson return ((db->pc_first ^ dest) & TARGET_PAGE_MASK) == 0; 124d3a2a1d8SRichard Henderson } 125d3a2a1d8SRichard Henderson 126597f9b2dSRichard Henderson void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, 127b1c09220SAnton Johansson vaddr pc, void *host_pc, const TranslatorOps *ops, 128b1c09220SAnton Johansson DisasContextBase *db) 129bb2e0039SLluís Vilanova { 130d40c5c79SRichard Henderson uint32_t cflags = tb_cflags(tb); 13156234233SRichard Henderson TCGOp *icount_start_insn; 1326ba6f818SEmilio G. Cota bool plugin_enabled; 133f9f1f56eSPavel Dovgalyuk 134bb2e0039SLluís Vilanova /* Initialize DisasContext */ 135bb2e0039SLluís Vilanova db->tb = tb; 136306c8721SRichard Henderson db->pc_first = pc; 137306c8721SRichard Henderson db->pc_next = pc; 138bb2e0039SLluís Vilanova db->is_jmp = DISAS_NEXT; 139bb2e0039SLluís Vilanova db->num_insns = 0; 140597f9b2dSRichard Henderson db->max_insns = *max_insns; 141c2ffd754SRichard Henderson db->singlestep_enabled = cflags & CF_SINGLE_STEP; 1420ca41ccfSRichard Henderson db->saved_can_do_io = -1; 14350627f1bSRichard Henderson db->host_addr[0] = host_pc; 14450627f1bSRichard Henderson db->host_addr[1] = NULL; 14550627f1bSRichard Henderson 146b542683dSEmilio G. Cota ops->init_disas_context(db, cpu); 147bb2e0039SLluís Vilanova tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ 148bb2e0039SLluís Vilanova 149bb2e0039SLluís Vilanova /* Start translating. */ 1500ca41ccfSRichard Henderson icount_start_insn = gen_tb_start(db, cflags); 151bb2e0039SLluís Vilanova ops->tb_start(db, cpu); 152bb2e0039SLluís Vilanova tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ 153bb2e0039SLluís Vilanova 1545d97e946SRichard Henderson if (cflags & CF_MEMI_ONLY) { 1555d97e946SRichard Henderson /* We should only see CF_MEMI_ONLY for io_recompile. */ 1565d97e946SRichard Henderson assert(cflags & CF_LAST_IO); 1575d97e946SRichard Henderson plugin_enabled = plugin_gen_tb_start(cpu, db, true); 1585d97e946SRichard Henderson } else { 1595d97e946SRichard Henderson plugin_enabled = plugin_gen_tb_start(cpu, db, false); 1605d97e946SRichard Henderson } 161*28a4f0baSRichard Henderson db->plugin_enabled = plugin_enabled; 1626ba6f818SEmilio G. Cota 163bb2e0039SLluís Vilanova while (true) { 1649b1890adSRichard Henderson *max_insns = ++db->num_insns; 165bb2e0039SLluís Vilanova ops->insn_start(db, cpu); 166bb2e0039SLluís Vilanova tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ 167bb2e0039SLluís Vilanova 1686ba6f818SEmilio G. Cota if (plugin_enabled) { 1696ba6f818SEmilio G. Cota plugin_gen_insn_start(cpu, db); 1706ba6f818SEmilio G. Cota } 1716ba6f818SEmilio G. Cota 172bb2e0039SLluís Vilanova /* Disassemble one instruction. The translate_insn hook should 173bb2e0039SLluís Vilanova update db->pc_next and db->is_jmp to indicate what should be 174bb2e0039SLluís Vilanova done next -- either exiting this loop or locate the start of 175bb2e0039SLluís Vilanova the next instruction. */ 176d40c5c79SRichard Henderson if (db->num_insns == db->max_insns && (cflags & CF_LAST_IO)) { 177bb2e0039SLluís Vilanova /* Accept I/O on the last instruction. */ 1780ca41ccfSRichard Henderson set_can_do_io(db, true); 179bb2e0039SLluís Vilanova } 1805d97e946SRichard Henderson ops->translate_insn(db, cpu); 181bb2e0039SLluís Vilanova 1826ba6f818SEmilio G. Cota /* 1836ba6f818SEmilio G. Cota * We can't instrument after instructions that change control 1846ba6f818SEmilio G. Cota * flow although this only really affects post-load operations. 1850f92d94aSEmilio Cota * 1860f92d94aSEmilio Cota * Calling plugin_gen_insn_end() before we possibly stop translation 1870f92d94aSEmilio Cota * is important. Even if this ends up as dead code, plugin generation 1880f92d94aSEmilio Cota * needs to see a matching plugin_gen_insn_{start,end}() pair in order 1890f92d94aSEmilio Cota * to accurately track instrumented helpers that might access memory. 1906ba6f818SEmilio G. Cota */ 1916ba6f818SEmilio G. Cota if (plugin_enabled) { 1926ba6f818SEmilio G. Cota plugin_gen_insn_end(); 1936ba6f818SEmilio G. Cota } 1946ba6f818SEmilio G. Cota 1950f92d94aSEmilio Cota /* Stop translation if translate_insn so indicated. */ 1960f92d94aSEmilio Cota if (db->is_jmp != DISAS_NEXT) { 1970f92d94aSEmilio Cota break; 1980f92d94aSEmilio Cota } 1990f92d94aSEmilio Cota 200bb2e0039SLluís Vilanova /* Stop translation if the output buffer is full, 201bb2e0039SLluís Vilanova or we have executed all of the allowed instructions. */ 202b542683dSEmilio G. Cota if (tcg_op_buf_full() || db->num_insns >= db->max_insns) { 203bb2e0039SLluís Vilanova db->is_jmp = DISAS_TOO_MANY; 204bb2e0039SLluís Vilanova break; 205bb2e0039SLluís Vilanova } 206bb2e0039SLluís Vilanova } 207bb2e0039SLluís Vilanova 208bb2e0039SLluís Vilanova /* Emit code to exit the TB, as indicated by db->is_jmp. */ 209bb2e0039SLluís Vilanova ops->tb_stop(db, cpu); 21056234233SRichard Henderson gen_tb_end(tb, cflags, icount_start_insn, db->num_insns); 211bb2e0039SLluís Vilanova 2126ba6f818SEmilio G. Cota if (plugin_enabled) { 2136ba6f818SEmilio G. Cota plugin_gen_tb_end(cpu); 2146ba6f818SEmilio G. Cota } 2156ba6f818SEmilio G. Cota 216bb2e0039SLluís Vilanova /* The disas_log hook may use these values rather than recompute. */ 217d9971435SRichard Henderson tb->size = db->pc_next - db->pc_first; 218d9971435SRichard Henderson tb->icount = db->num_insns; 219bb2e0039SLluís Vilanova 220bb2e0039SLluís Vilanova if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM) 221bb2e0039SLluís Vilanova && qemu_log_in_addr_range(db->pc_first)) { 222c60f599bSRichard Henderson FILE *logfile = qemu_log_trylock(); 22378b54858SRichard Henderson if (logfile) { 22478b54858SRichard Henderson fprintf(logfile, "----------------\n"); 2258eb806a7SRichard Henderson ops->disas_log(db, cpu, logfile); 22678b54858SRichard Henderson fprintf(logfile, "\n"); 227fc59d2d8SRobert Foley qemu_log_unlock(logfile); 228bb2e0039SLluís Vilanova } 22978b54858SRichard Henderson } 230bb2e0039SLluís Vilanova } 231f025692cSIlya Leoshkevich 23250627f1bSRichard Henderson static void *translator_access(CPUArchState *env, DisasContextBase *db, 233b1c09220SAnton Johansson vaddr pc, size_t len) 234f025692cSIlya Leoshkevich { 23550627f1bSRichard Henderson void *host; 236b1c09220SAnton Johansson vaddr base, end; 23750627f1bSRichard Henderson TranslationBlock *tb; 23850627f1bSRichard Henderson 23950627f1bSRichard Henderson tb = db->tb; 24050627f1bSRichard Henderson 24150627f1bSRichard Henderson /* Use slow path if first page is MMIO. */ 24228905cfbSRichard Henderson if (unlikely(tb_page_addr0(tb) == -1)) { 24350627f1bSRichard Henderson return NULL; 24450627f1bSRichard Henderson } 24550627f1bSRichard Henderson 24650627f1bSRichard Henderson end = pc + len - 1; 24750627f1bSRichard Henderson if (likely(is_same_page(db, end))) { 24850627f1bSRichard Henderson host = db->host_addr[0]; 24950627f1bSRichard Henderson base = db->pc_first; 25050627f1bSRichard Henderson } else { 25150627f1bSRichard Henderson host = db->host_addr[1]; 25250627f1bSRichard Henderson base = TARGET_PAGE_ALIGN(db->pc_first); 25350627f1bSRichard Henderson if (host == NULL) { 254deba7870SRichard Henderson tb_page_addr_t page0, old_page1, new_page1; 255deba7870SRichard Henderson 256deba7870SRichard Henderson new_page1 = get_page_addr_code_hostp(env, base, &db->host_addr[1]); 2572627e452SRichard Henderson 2582627e452SRichard Henderson /* 2592627e452SRichard Henderson * If the second page is MMIO, treat as if the first page 2602627e452SRichard Henderson * was MMIO as well, so that we do not cache the TB. 2612627e452SRichard Henderson */ 262deba7870SRichard Henderson if (unlikely(new_page1 == -1)) { 263deba7870SRichard Henderson tb_unlock_pages(tb); 2642627e452SRichard Henderson tb_set_page_addr0(tb, -1); 2652627e452SRichard Henderson return NULL; 2662627e452SRichard Henderson } 2672627e452SRichard Henderson 268deba7870SRichard Henderson /* 269deba7870SRichard Henderson * If this is not the first time around, and page1 matches, 270deba7870SRichard Henderson * then we already have the page locked. Alternately, we're 271deba7870SRichard Henderson * not doing anything to prevent the PTE from changing, so 272deba7870SRichard Henderson * we might wind up with a different page, requiring us to 273deba7870SRichard Henderson * re-do the locking. 274deba7870SRichard Henderson */ 275deba7870SRichard Henderson old_page1 = tb_page_addr1(tb); 276deba7870SRichard Henderson if (likely(new_page1 != old_page1)) { 277deba7870SRichard Henderson page0 = tb_page_addr0(tb); 278deba7870SRichard Henderson if (unlikely(old_page1 != -1)) { 279deba7870SRichard Henderson tb_unlock_page1(page0, old_page1); 280deba7870SRichard Henderson } 281deba7870SRichard Henderson tb_set_page_addr1(tb, new_page1); 282deba7870SRichard Henderson tb_lock_page1(page0, new_page1); 283deba7870SRichard Henderson } 28450627f1bSRichard Henderson host = db->host_addr[1]; 285f025692cSIlya Leoshkevich } 286f025692cSIlya Leoshkevich 28750627f1bSRichard Henderson /* Use slow path when crossing pages. */ 28850627f1bSRichard Henderson if (is_same_page(db, pc)) { 28950627f1bSRichard Henderson return NULL; 29050627f1bSRichard Henderson } 291f025692cSIlya Leoshkevich } 292f025692cSIlya Leoshkevich 29350627f1bSRichard Henderson tcg_debug_assert(pc >= base); 29450627f1bSRichard Henderson return host + (pc - base); 29550627f1bSRichard Henderson } 296f025692cSIlya Leoshkevich 297bc54ef8cSRichard Henderson static void plugin_insn_append(abi_ptr pc, const void *from, size_t size) 298bc54ef8cSRichard Henderson { 299bc54ef8cSRichard Henderson #ifdef CONFIG_PLUGIN 300bc54ef8cSRichard Henderson struct qemu_plugin_insn *insn = tcg_ctx->plugin_insn; 301bc54ef8cSRichard Henderson abi_ptr off; 302bc54ef8cSRichard Henderson 303bc54ef8cSRichard Henderson if (insn == NULL) { 304bc54ef8cSRichard Henderson return; 305bc54ef8cSRichard Henderson } 306bc54ef8cSRichard Henderson off = pc - insn->vaddr; 307bc54ef8cSRichard Henderson if (off < insn->data->len) { 308bc54ef8cSRichard Henderson g_byte_array_set_size(insn->data, off); 309bc54ef8cSRichard Henderson } else if (off > insn->data->len) { 310bc54ef8cSRichard Henderson /* we have an unexpected gap */ 311bc54ef8cSRichard Henderson g_assert_not_reached(); 312bc54ef8cSRichard Henderson } 313bc54ef8cSRichard Henderson 314bc54ef8cSRichard Henderson insn->data = g_byte_array_append(insn->data, from, size); 315bc54ef8cSRichard Henderson #endif 316bc54ef8cSRichard Henderson } 317bc54ef8cSRichard Henderson 31850627f1bSRichard Henderson uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, abi_ptr pc) 31950627f1bSRichard Henderson { 32050627f1bSRichard Henderson uint8_t ret; 32150627f1bSRichard Henderson void *p = translator_access(env, db, pc, sizeof(ret)); 32250627f1bSRichard Henderson 32350627f1bSRichard Henderson if (p) { 32450627f1bSRichard Henderson plugin_insn_append(pc, p, sizeof(ret)); 32550627f1bSRichard Henderson return ldub_p(p); 32650627f1bSRichard Henderson } 32750627f1bSRichard Henderson ret = cpu_ldub_code(env, pc); 32850627f1bSRichard Henderson plugin_insn_append(pc, &ret, sizeof(ret)); 32950627f1bSRichard Henderson return ret; 33050627f1bSRichard Henderson } 33150627f1bSRichard Henderson 33250627f1bSRichard Henderson uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, abi_ptr pc) 33350627f1bSRichard Henderson { 33450627f1bSRichard Henderson uint16_t ret, plug; 33550627f1bSRichard Henderson void *p = translator_access(env, db, pc, sizeof(ret)); 33650627f1bSRichard Henderson 33750627f1bSRichard Henderson if (p) { 33850627f1bSRichard Henderson plugin_insn_append(pc, p, sizeof(ret)); 33950627f1bSRichard Henderson return lduw_p(p); 34050627f1bSRichard Henderson } 34150627f1bSRichard Henderson ret = cpu_lduw_code(env, pc); 34250627f1bSRichard Henderson plug = tswap16(ret); 34350627f1bSRichard Henderson plugin_insn_append(pc, &plug, sizeof(ret)); 34450627f1bSRichard Henderson return ret; 34550627f1bSRichard Henderson } 34650627f1bSRichard Henderson 34750627f1bSRichard Henderson uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, abi_ptr pc) 34850627f1bSRichard Henderson { 34950627f1bSRichard Henderson uint32_t ret, plug; 35050627f1bSRichard Henderson void *p = translator_access(env, db, pc, sizeof(ret)); 35150627f1bSRichard Henderson 35250627f1bSRichard Henderson if (p) { 35350627f1bSRichard Henderson plugin_insn_append(pc, p, sizeof(ret)); 35450627f1bSRichard Henderson return ldl_p(p); 35550627f1bSRichard Henderson } 35650627f1bSRichard Henderson ret = cpu_ldl_code(env, pc); 35750627f1bSRichard Henderson plug = tswap32(ret); 35850627f1bSRichard Henderson plugin_insn_append(pc, &plug, sizeof(ret)); 35950627f1bSRichard Henderson return ret; 36050627f1bSRichard Henderson } 36150627f1bSRichard Henderson 36250627f1bSRichard Henderson uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, abi_ptr pc) 36350627f1bSRichard Henderson { 36450627f1bSRichard Henderson uint64_t ret, plug; 36550627f1bSRichard Henderson void *p = translator_access(env, db, pc, sizeof(ret)); 36650627f1bSRichard Henderson 36750627f1bSRichard Henderson if (p) { 36850627f1bSRichard Henderson plugin_insn_append(pc, p, sizeof(ret)); 36950627f1bSRichard Henderson return ldq_p(p); 37050627f1bSRichard Henderson } 37150627f1bSRichard Henderson ret = cpu_ldq_code(env, pc); 37250627f1bSRichard Henderson plug = tswap64(ret); 37350627f1bSRichard Henderson plugin_insn_append(pc, &plug, sizeof(ret)); 37450627f1bSRichard Henderson return ret; 37550627f1bSRichard Henderson } 376309e014dSRichard Henderson 377309e014dSRichard Henderson void translator_fake_ldb(uint8_t insn8, abi_ptr pc) 378309e014dSRichard Henderson { 379309e014dSRichard Henderson plugin_insn_append(pc, &insn8, sizeof(insn8)); 380309e014dSRichard Henderson } 381