aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>1996-08-06 20:01:07 +0000
committerMartin Hunt <hunt@redhat.com>1996-08-06 20:01:07 +0000
commite805bff71d12578542bf38ce2f0706dfee8b62a2 (patch)
treec80fcb07f015f44cabe129d3c732d61f4520adf7 /gas
parent5d9a99a79b7ef8d44adcdd0d48aab8df5de543ab (diff)
downloadgdb-e805bff71d12578542bf38ce2f0706dfee8b62a2.zip
gdb-e805bff71d12578542bf38ce2f0706dfee8b62a2.tar.gz
gdb-e805bff71d12578542bf38ce2f0706dfee8b62a2.tar.bz2
Tue Aug 6 12:58:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* tc-d10v.c: Added code to support 32-bit fixups for stabs.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-d10v.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c
index 1b0480b..eb4ef35 100644
--- a/gas/config/tc-d10v.c
+++ b/gas/config/tc-d10v.c
@@ -309,7 +309,7 @@ get_reloc (op)
if (bits == 8)
return (BFD_RELOC_D10V_10_PCREL_R);
else
- return (BFD_RELOC_D10V_18_PCREL);
+ return (BFD_RELOC_D10V_18_PCREL);
}
return (BFD_RELOC_16);
@@ -466,7 +466,7 @@ build_insn (opcode, opers, insn)
/*
printf("need a fixup: ");
print_expr_1(stdout,&opers[i]);
- printf("\n");
+ printf("\n");ddd
*/
if (fixups->fc >= MAX_INSN_FIXUPS)
@@ -524,7 +524,7 @@ write_long (opcode, insn, fx)
4,
&(fx->fix[i].exp),
1,
- fx->fix[i].reloc);
+ fx->fix[i].reloc|2048);
}
}
fx->fc = 0;
@@ -575,7 +575,7 @@ write_1_short (opcode, insn, fx)
4,
&(fx->fix[i].exp),
1,
- fx->fix[i].reloc);
+ fx->fix[i].reloc|2048);
}
}
fx->fc = 0;
@@ -687,7 +687,7 @@ for (j=0; j<2; j++)
4,
&(fx->fix[i].exp),
1,
- fx->fix[i].reloc);
+ fx->fix[i].reloc|2048);
}
}
fx->fc = 0;
@@ -1003,7 +1003,7 @@ tc_gen_reloc (seg, fixp)
return NULL;
}
reloc->addend = fixp->fx_addnumber;
- /* printf("tc_gen_reloc: addr=%x addend=%x\n", reloc->address, reloc->addend); */
+ /* printf("tc_gen_reloc: addr=%x addend=%x\n", reloc->address, reloc->addend); */
return reloc;
}
@@ -1060,17 +1060,21 @@ md_apply_fix3 (fixp, valuep, seg)
}
}
- /* printf("md_apply_fix: value=0x%x type=%d\n", value, fixp->fx_r_type); */
+ /* printf("md_apply_fix: value=0x%x type=0x%x where=0x%x\n", value, fixp->fx_r_type,fixp->fx_where); */
op_type = fixp->fx_r_type;
- if (op_type & 1024)
+ if (op_type & 2048)
{
- op_type -= 1024;
- fixp->fx_r_type = BFD_RELOC_D10V_10_PCREL_L;
- left = 1;
+ op_type -= 2048;
+ if (op_type & 1024)
+ {
+ op_type -= 1024;
+ fixp->fx_r_type = BFD_RELOC_D10V_10_PCREL_L;
+ left = 1;
+ }
+ else
+ fixp->fx_r_type = get_reloc((struct d10v_operand *)&d10v_operands[op_type]);
}
- else
- fixp->fx_r_type = get_reloc((struct d10v_operand *)&d10v_operands[op_type]);
/* Fetch the instruction, insert the fully resolved operand
value, and stuff the instruction back again. */
@@ -1087,13 +1091,16 @@ md_apply_fix3 (fixp, valuep, seg)
if (!fixp->fx_pcrel)
value -= fixp->fx_where;
value >>= 2;
+ break;
+ case BFD_RELOC_32:
+ bfd_putb32 ((bfd_vma) value, (unsigned char *) where);
+ return 1;
default:
break;
}
- /* printf(" insn=%x value=%x where=%x pcrel=%x\n",insn,value,fixp->fx_where,fixp->fx_pcrel); */
-
+
+ /* printf(" insn=%x value=%x where=%x pcrel=%x\n",insn,value,fixp->fx_where,fixp->fx_pcrel); */
insn = d10v_insert_operand (insn, op_type, (offsetT)value, left);
-
/* printf(" new insn=%x\n",insn); */
bfd_putb32 ((bfd_vma) insn, (unsigned char *) where);