1130,1132d1129 < fits16 = (disp >= -(bfd_signed_vma)0x8000 && disp < 0x8000); < fits32 = (disp >= -(bfd_signed_vma)0x80000000 && disp < 0x7fff8000); < 1135a1133,1135 > int insn_disp; > bfd_signed_vma xdisp; > 1147a1148,1159 > > /* extract the displacement from the instruction, sign-extending it > if necessary, then test whether it is within 16 or 32 bits > displacement from GP */ > > insn_disp = insn & 0x0000ffff; > if (insn_disp & 0x00008000) > insn_disp |= 0xffff0000; /* negative; sign-extend */ > > xdisp = disp + insn_disp; > fits16 = (xdisp >= -(bfd_signed_vma)0x8000 && xdisp < 0x8000); > fits32 = (xdisp >= -(bfd_signed_vma)0x80000000 && xdisp < 0x7fff8000); 1150,1155c1162,1164 < /* FIXME: sanity check the insn for mem format with < zero addend. */ < < /* Take the op code and dest from this insn, take the base < register from the literal insn. Leave the offset alone. */ < insn = (insn & 0xffe00000) | (lit_insn & 0x001f0000); --- > /* Take the op code and dest from this insn, take the base > register from the literal insn. Leave the offset alone. */ > insn = (insn & 0xffe0ffff) | (lit_insn & 0x001f0000); 1168,1169c1177 < /* FIXME: sanity check that lit insn Ra is mem insn Rb, and < that mem_insn disp is zero. */ --- > /* FIXME: sanity check that lit insn Ra is mem insn Rb */