On 05/23/2011 04:20 PM, Max Filippov wrote: > I probably just don't get what you call 'out-of-line'. In fact > do_unaligned_access will be called for every unaligned access, and > alignment condition will be checked for every access. It just happens > in other place. Does it have more chances to be optimized better than > TCG code, or is it less TCG code itself that makes difference?
Out of line meaning not inside TCG code at all. The fast-path through a tcg_qemu_ld operation handles aligned memory accesses that hit the TLB. Unaligned accesses or TLB misses go to the slow path, in __ld[bwlq]_mmu. It is in these functions that we test for ALIGNED_ONLY, which enables the do_unaligned_access hook. r~