* config/tc-mn10300.c (md_assemble): Correctly determine the
correct location and type for each relocation. (md_pcrel_from): Simplify. Last week's reloc work.
This commit is contained in:
parent
b016565b0c
commit
0671e7f6c6
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Mon Nov 25 08:49:36 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* config/tc-mn10300.c (md_assemble): Correctly determine the
|
||||||
|
correct location and type for each relocation.
|
||||||
|
(md_pcrel_from): Simplify.
|
||||||
|
|
||||||
Fri Nov 22 15:42:26 1996 Ian Lance Taylor <ian@cygnus.com>
|
Fri Nov 22 15:42:26 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* config/tc-sh.c (md_convert_frag): Improve warning when branch is
|
* config/tc-sh.c (md_convert_frag): Improve warning when branch is
|
||||||
|
|
|
@ -846,15 +846,16 @@ keep_going:
|
||||||
|| ((insn >> 16) & 0xffff) == 0xfe02))
|
|| ((insn >> 16) & 0xffff) == 0xfe02))
|
||||||
size -= 1;
|
size -= 1;
|
||||||
|
|
||||||
/* Determine offset from start of this insn to insert the
|
|
||||||
reloc. Except for a few exceptions we insert the reloc
|
|
||||||
at the tail of the instruction. */
|
|
||||||
offset = size - reloc_size / 8;
|
offset = size - reloc_size / 8;
|
||||||
|
|
||||||
/* Choose a proper BFD relocation type. */
|
/* Choose a proper BFD relocation type. */
|
||||||
if (pcrel)
|
if (pcrel)
|
||||||
{
|
{
|
||||||
if (reloc_size == 32)
|
if (size == 6)
|
||||||
|
reloc = BFD_RELOC_MN10300_32_PCREL;
|
||||||
|
else if (size == 4)
|
||||||
|
reloc = BFD_RELOC_MN10300_16_PCREL;
|
||||||
|
else if (reloc_size == 32)
|
||||||
reloc = BFD_RELOC_32_PCREL;
|
reloc = BFD_RELOC_32_PCREL;
|
||||||
else if (reloc_size == 16)
|
else if (reloc_size == 16)
|
||||||
reloc = BFD_RELOC_16_PCREL;
|
reloc = BFD_RELOC_16_PCREL;
|
||||||
|
@ -866,9 +867,9 @@ keep_going:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (reloc_size == 32)
|
if (reloc_size == 32)
|
||||||
reloc = BFD_RELOC_32;
|
reloc = BFD_RELOC_MN10300_32B;
|
||||||
else if (reloc_size == 16)
|
else if (reloc_size == 16)
|
||||||
reloc = BFD_RELOC_16;
|
reloc = BFD_RELOC_MN10300_16B;
|
||||||
else if (reloc_size == 8)
|
else if (reloc_size == 8)
|
||||||
reloc = BFD_RELOC_8;
|
reloc = BFD_RELOC_8;
|
||||||
else
|
else
|
||||||
|
@ -928,12 +929,15 @@ long
|
||||||
md_pcrel_from (fixp)
|
md_pcrel_from (fixp)
|
||||||
fixS *fixp;
|
fixS *fixp;
|
||||||
{
|
{
|
||||||
|
return fixp->fx_frag->fr_address;
|
||||||
|
#if 0
|
||||||
if (fixp->fx_addsy != (symbolS *) NULL && ! S_IS_DEFINED (fixp->fx_addsy))
|
if (fixp->fx_addsy != (symbolS *) NULL && ! S_IS_DEFINED (fixp->fx_addsy))
|
||||||
{
|
{
|
||||||
/* The symbol is undefined. Let the linker figure it out. */
|
/* The symbol is undefined. Let the linker figure it out. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return fixp->fx_frag->fr_address + fixp->fx_where;
|
return fixp->fx_frag->fr_address + fixp->fx_where;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue