On 2 February 2014 19:01, Xin Tong <trent.t...@gmail.com> wrote: > I am getting some compilation errors while stringnifying the > ADDR_READ, addr_write. > > function helper_be_ldq_cmmu > > if (!VICTIM_TLB_HIT(ADDR_READ)) { > > > macro > > #define VICTIM_TLB_HIT(ACCESS_TYPE) > \ > ({ > \ > /* we are about to do a page table walk. our last hope is the > \ > * victim tlb. try to refill from the victim tlb before walking the > \ > * page table. */ > \ > int vidx; > \ > hwaddr tmpiotlb; > \ > CPUTLBEntry tmptlb; > \ > for (vidx = CPU_VTLB_SIZE; vidx >= 0; --vidx) { > \ > if (env->tlb_v_table[mmu_idx][vidx].#ACCESS_TYPE > \ > == (addr & TARGET_PAGE_MASK)) { > \ > /* found entry in victim tlb, swap tlb and iotlb */ > \ > tmptlb = env->tlb_table[mmu_idx][index]; > \ > env->tlb_table[mmu_idx][index] = env->tlb_v_table[mmu_idx][vidx]; > \ > env->tlb_v_table[mmu_idx][vidx] = tmptlb; > \ > tmpiotlb = env->iotlb[mmu_idx][index]; > \ > > > compilation error > > /home/xtong/qemu/include/exec/softmmu_template.h: In function > 'helper_be_ldq_cmmu': > /home/xtong/qemu/include/exec/softmmu_template.h:266: error: expected > identifier before string constant
That's because you're trying to stringify the macro argument with that '#'. Don't do that -- you don't want a string. thanks -- PMM