Revision 2d097a83

b/tcg/hppa/tcg-target.c
723 723

  
724 724
        tcg_out32(s, op | reassemble_17(val));
725 725
    } else {
726
        /* We need to keep the offset unchanged for retranslation.  */
727
        uint32_t old_insn = *(uint32_t *)s->code_ptr;
728

  
726 729
        tcg_out_reloc(s, s->code_ptr, R_PARISC_PCREL17F, label_index, 0);
727
        tcg_out32(s, op);
730
        tcg_out32(s, op | (old_insn & 0x1f1ffdu));
728 731
    }
729 732
}
730 733

  
......
777 780
        tcg_out32(s, op | reassemble_12(val));
778 781
        tcg_out_nop(s);
779 782
    } else {
783
        /* We need to keep the offset unchanged for retranslation.  */
784
        uint32_t old_insn = *(uint32_t *)s->code_ptr;
785

  
780 786
        tcg_out_reloc(s, s->code_ptr, R_PARISC_PCREL12F, label_index, 0);
781 787
        /* ??? Assume that all branches to undefined labels are forward.
782 788
           Which means that if the nul bit is set, the delay slot is
783 789
           not executed if the branch is taken, which is what we want.  */
784
        tcg_out32(s, op | 2);
790
        tcg_out32(s, op | 2 | (old_insn & 0x1ffdu));
785 791
    }
786 792
}
787 793

  

Also available in: Unified diff