grep しても見つからないわけだ。disas_arm_insn 内の ldl_code の正体は、例のこれ。
これで、softmmu_header.h 内の#define ACCESS_TYPE (NB_MMU_MODES + 1)#define MEMSUFFIX _code#define env cpu_single_env#define DATA_SIZE 1#include "softmmu_header.h"#define DATA_SIZE 2#include "softmmu_header.h"#define DATA_SIZE 4#include "softmmu_header.h"#define DATA_SIZE 8#include "softmmu_header.h"#undef ACCESS_TYPE#undef MEMSUFFIX#undef env#endif
/* generic load/store macros */static inline RES_TYPE glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr){int index;RES_TYPE res;target_ulong addr;unsigned long physaddr;int mmu_idx;addr = ptr;index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);mmu_idx = CPU_MMU_INDEX;if (__builtin_expect(env->tlb_table[mmu_idx][index].ADDR_READ !=(addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) {res = glue(glue(__ld, SUFFIX), MMUSUFFIX)(addr, mmu_idx);} else {physaddr = addr + env->tlb_table[mmu_idx][index].addend;res = glue(glue(ld, USUFFIX), _raw)((uint8_t *)physaddr);}return res;}
これが tatic inline uint32_t ldl_code(target_ulong ptr) に特殊化される。
/* generic load/store macros */static inline uint32_t ldl_code(target_ulong ptr){int index;uint32_t res;target_ulong addr;unsigned long physaddr;int mmu_idx;addr = ptr;index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);mmu_idx = CPU_MMU_INDEX;if (__builtin_expect(env->tlb_table[mmu_idx][index].ADDR_READ !=(addr & (TARGET_PAGE_MASK | (DATA_SIZE - 1))), 0)) {res = __ldl_cmmu(addr, mmu_idx);} else {physaddr = addr + env->tlb_table[mmu_idx][index].addend;res = ldl_raw((uint8_t *)physaddr);}return res;}
0 件のコメント:
コメントを投稿