Skip to content
  • Richard Henderson's avatar
    01ecaf43
    tcg: Merge GETPC and GETRA · 01ecaf43
    Richard Henderson authored
    
    
    The return address argument to the softmmu template helpers was
    confused.  In the legacy case, we wanted to indicate that there
    is no return address, and so passed in NULL.  However, we then
    immediately subtracted GETPC_ADJ from NULL, resulting in a non-zero
    value, indicating the presence of an (invalid) return address.
    
    Push the GETPC_ADJ subtraction down to the only point it's required:
    immediately before use within cpu_restore_state_from_tb, after all
    NULL pointer checks have been completed.
    
    This makes GETPC and GETRA identical.  Remove GETRA as the lesser
    used macro, replacing all uses with GETPC.
    
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
    01ecaf43
    tcg: Merge GETPC and GETRA
    Richard Henderson authored
    
    
    The return address argument to the softmmu template helpers was
    confused.  In the legacy case, we wanted to indicate that there
    is no return address, and so passed in NULL.  However, we then
    immediately subtracted GETPC_ADJ from NULL, resulting in a non-zero
    value, indicating the presence of an (invalid) return address.
    
    Push the GETPC_ADJ subtraction down to the only point it's required:
    immediately before use within cpu_restore_state_from_tb, after all
    NULL pointer checks have been completed.
    
    This makes GETPC and GETRA identical.  Remove GETRA as the lesser
    used macro, replacing all uses with GETPC.
    
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
Loading