From daa04fa206608d01551b0e8b49c78ecb7eb7f39c Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Wed, 29 Jan 1997 23:36:06 +0000 Subject: [PATCH] Wed Jan 29 15:31:12 1997 Martin M. Hunt * config/tc-d10v.h (md_do_align): Add this hook to call d10v_cleanup() when a ".align" is detected. Fixes PR11487. * config/tc-d10v.c (find_opcode): Correctly calculate branch displacement when .aligns are present. --- gas/config/tc-d10v.c | 7 ++----- gas/config/tc-d10v.h | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c index 04f50cd..e22fe27 100644 --- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -912,9 +912,6 @@ md_assemble (str) static int etype=0; /* saved extype. used for multiline instructions */ char *str2; - for (str2 = str; *str2; str2++) - *str2 = tolower(*str2); - if (etype == 0) { /* look for the special multiple instruction separators */ @@ -1027,7 +1024,7 @@ do_assemble (str, opcode) && !is_end_of_line[*op_end] && *op_end != ' '; op_end++) { - name[nlen] = op_start[nlen]; + name[nlen] = tolower(op_start[nlen]); nlen++; } name[nlen] = 0; @@ -1103,7 +1100,7 @@ find_opcode (opcode, myops) /* calculate the current address by running through the previous frags */ /* and adding our current offset */ for (value = 0, f = frchain_now->frch_root; f; f = f->fr_next) - value += f->fr_fix; + value += f->fr_fix + f->fr_offset; if (flags & OPERAND_ADDR) value = S_GET_VALUE(myops[opnum].X_add_symbol) - value - diff --git a/gas/config/tc-d10v.h b/gas/config/tc-d10v.h index 3f50eef..b87d663 100644 --- a/gas/config/tc-d10v.h +++ b/gas/config/tc-d10v.h @@ -30,7 +30,6 @@ #define TARGET_FORMAT "elf32-d10v" #define MD_APPLY_FIX3 -#define md_operand(x) /* call md_pcrel_from_section, not md_pcrel_from */ #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC) @@ -50,6 +49,8 @@ int d10v_cleanup PARAMS ((void)); #define md_after_pass_hook() d10v_cleanup() +#define md_cleanup() d10v_cleanup() +#define md_do_align(a,b,c,d) d10v_cleanup() #define TC_START_LABEL(ch, ptr) (ch == ':' && d10v_cleanup()) -- 2.7.4