• Stefan Weil's avatar
    w64: Fix data type of tb_next and other variables used for host addresses · 6375e09e
    Stefan Weil authored
    QEMU host addresses must use uintptr_t to be portable for hosts with
    an unusual size of long (w64).
    
    tb_jmp_offset is an uint16_t value, therefore the local variable offset
    in function tb_set_jmp_target was changed from unsigned long to uint16_t.
    
    The type cast to long in function tb_add_jump now also uses uintptr_t.
    For the bit operation used here, the signedness of the type cast does
    not matter.
    
    Some remaining unsigned long values are either only used for ARM assembler
    code or will be fixed in a later patch for PPC.
    
    v2:
    Fix signature of tb_find_pc in exec.c, too (hint from Blue Swirl, thanks).
    There remain lots of other long / unsigned long in exec.c which must be
    replaced by uintptr_t. This will be done in a separate patch. Here
    only one of these type casts is fixed.
    
    v3:
    Also fix signature of page_unprotect.
    Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
    Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
    6375e09e
translate-all.c 4.15 KB