Revision a69abbe0 tcg/ppc64/tcg-target.c

b/tcg/ppc64/tcg-target.c
773 773
void tcg_target_qemu_prologue (TCGContext *s)
774 774
{
775 775
    int i, frame_size;
776
    uint64_t addr;
776 777

  
777 778
    frame_size = 0
778 779
        + 8                     /* back chain */
......
786 787
        ;
787 788
    frame_size = (frame_size + 15) & ~15;
788 789

  
790
    /* First emit adhoc function descriptor */
791
    addr = (uint64_t) s->code_ptr + 24;
792
    tcg_out32 (s, addr >> 32); tcg_out32 (s, addr); /* entry point */
793
    s->code_ptr += 16;          /* skip TOC and environment pointer */
794

  
795
    /* Prologue */
789 796
    tcg_out32 (s, MFSPR | RT (0) | LR);
790 797
    tcg_out32 (s, STDU | RS (1) | RA (1) | (-frame_size & 0xffff));
791 798
    for (i = 0; i < ARRAY_SIZE (tcg_target_callee_save_regs); ++i)
......
796 803
                       )
797 804
            );
798 805
    tcg_out32 (s, STD | RS (0) | RA (1) | (frame_size + 20));
799
    tcg_out32 (s, STD | RS (2) | RA (1) | (frame_size + 40));
800 806

  
801 807
    tcg_out32 (s, MTSPR | RS (3) | CTR);
802 808
    tcg_out32 (s, BCCTR | BO_ALWAYS);
809

  
810
    /* Epilogue */
803 811
    tb_ret_addr = s->code_ptr;
804 812

  
805 813
    for (i = 0; i < ARRAY_SIZE (tcg_target_callee_save_regs); ++i)
......
810 818
                       )
811 819
            );
812 820
    tcg_out32 (s, LD | RT (0) | RA (1) | (frame_size + 20));
813
    tcg_out32 (s, LD | RT (2) | RA (1) | (frame_size + 40));
814 821
    tcg_out32 (s, MTSPR | RS (0) | LR);
815 822
    tcg_out32 (s, ADDI | RT (1) | RA (1) | frame_size);
816 823
    tcg_out32 (s, BCLR | BO_ALWAYS);

Also available in: Unified diff