X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-m32c.c;h=e9ebf34b6ba9c4e66cf051f6f1cbbe16e9acbbc5;hb=e110eeb74e39496ca32a52d478319f0d840adc2c;hp=930342294a7dda2589389e2569d5f1616be12fc2;hpb=76d95df787c155078ddc03ca40d70fd5174f18c5;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c index 930342294a..e9ebf34b6b 100644 --- a/gas/config/tc-m32c.c +++ b/gas/config/tc-m32c.c @@ -1018,6 +1018,37 @@ md_cgen_lookup_reloc (const CGEN_INSN * insn ATTRIBUTE_UNUSED, return BFD_RELOC_NONE; } +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) {