aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m32c.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2007-02-04 04:45:36 +0000
committerDJ Delorie <dj@redhat.com>2007-02-04 04:45:36 +0000
commite110eeb74e39496ca32a52d478319f0d840adc2c (patch)
tree8cdb50e2e0240cfba56bc81a4bb4000674c8879a /gas/config/tc-m32c.c
parent76d95df787c155078ddc03ca40d70fd5174f18c5 (diff)
downloadgdb-e110eeb74e39496ca32a52d478319f0d840adc2c.zip
gdb-e110eeb74e39496ca32a52d478319f0d840adc2c.tar.gz
gdb-e110eeb74e39496ca32a52d478319f0d840adc2c.tar.bz2
* config/tc-m32c.c (m32c_cons_fix_new): New. Added to support 3
byte relocs. * config/tc-m32c.h (TC_CONS_FIX_NEW): Define. (m32c_cons_fix_new): Prototype.
Diffstat (limited to 'gas/config/tc-m32c.c')
-rw-r--r--gas/config/tc-m32c.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c
index 9303422..e9ebf34 100644
--- a/gas/config/tc-m32c.c
+++ b/gas/config/tc-m32c.c
@@ -1019,6 +1019,37 @@ md_cgen_lookup_reloc (const CGEN_INSN * insn ATTRIBUTE_UNUSED,
}
void
+m32c_cons_fix_new (fragS * frag,
+ int where,
+ int size,
+ expressionS *exp)
+{
+ bfd_reloc_code_real_type type;
+
+ switch (size)
+ {
+ case 1:
+ type = BFD_RELOC_8;
+ break;
+ case 2:
+ type = BFD_RELOC_16;
+ break;
+ case 3:
+ type = BFD_RELOC_24;
+ break;
+ case 4:
+ default:
+ type = BFD_RELOC_32;
+ break;
+ case 8:
+ type = BFD_RELOC_64;
+ break;
+ }
+
+ fix_new_exp (frag, where, (int) size, exp, 0, type);
+}
+
+void
m32c_apply_fix (struct fix *f, valueT *t, segT s)
{
if (f->fx_r_type == BFD_RELOC_M32C_RL_JUMP