Revision b9e946c7 tcg/ppc/tcg-target.c

b/tcg/ppc/tcg-target.c
933 933
    tcg_out32 (s, STW | RS (0) | RA (1) | (frame_size + LR_OFFSET));
934 934

  
935 935
#ifdef CONFIG_USE_GUEST_BASE
936
    tcg_out_movi (s, TCG_TYPE_I32, TCG_GUEST_BASE_REG, GUEST_BASE);
936
    if (GUEST_BASE) {
937
        tcg_out_movi (s, TCG_TYPE_I32, TCG_GUEST_BASE_REG, GUEST_BASE);
938
        tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
939
    }
937 940
#endif
938 941

  
939 942
    tcg_out32 (s, MTSPR | RS (3) | CTR);
......
1914 1917
#ifdef _CALL_SYSV
1915 1918
    tcg_regset_set_reg(s->reserved_regs, TCG_REG_R13);
1916 1919
#endif
1917
#ifdef CONFIG_USE_GUEST_BASE
1918
    tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
1919
#endif
1920 1920

  
1921 1921
    tcg_add_target_add_op_defs(ppc_op_defs);
1922 1922
}

Also available in: Unified diff