diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2008-03-26 16:33:33 +0000 |
---|---|---|
committer | Bernd Schmidt <bernd.schmidt@analog.com> | 2008-03-26 16:33:33 +0000 |
commit | 5d68638455e7970fdb67fe2cca24e6d592eaf66c (patch) | |
tree | 4f44a2ef51b10aecf41c3a6d86a75a51bd3c4ee6 /gas/config/tc-bfin.c | |
parent | 5a39261ae8a54113a32e3bdff316a20c36b8bd90 (diff) | |
download | binutils-redhat-5d68638455e7970fdb67fe2cca24e6d592eaf66c.tar.gz |
gas/:
* config/tc-bfin.c (bfin_start_line_hook): Localize the labels
generated for LOOP_BEGIN and LOOP_END instructions.
(bfin_gen_loop): Likewise.
gas/testsuite/:
* gas/bfin/flow.d: Adjust since the generated labels for LOOP_BEGIN
and LOOP_END instruction are local now.
* gas/bfin/flow2.d: Likewise.
Diffstat (limited to 'gas/config/tc-bfin.c')
-rw-r--r-- | gas/config/tc-bfin.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c index 515019898d..4652efa811 100644 --- a/gas/config/tc-bfin.c +++ b/gas/config/tc-bfin.c @@ -866,15 +866,17 @@ bfin_start_line_hook () input_line_pointer = c; if (maybe_end) { - label_name = (char *) xmalloc ((c - c1) + strlen ("__END") + 1); + label_name = (char *) xmalloc ((c - c1) + strlen ("__END") + 5); label_name[0] = 0; + strcat (label_name, "L$L$"); strncat (label_name, c1, c-c1); strcat (label_name, "__END"); } else /* maybe_begin. */ { - label_name = (char *) xmalloc ((c - c1) + strlen ("__BEGIN") + 1); + label_name = (char *) xmalloc ((c - c1) + strlen ("__BEGIN") + 5); label_name[0] = 0; + strcat (label_name, "L$L$"); strncat (label_name, c1, c-c1); strcat (label_name, "__BEGIN"); } @@ -884,8 +886,7 @@ bfin_start_line_hook () /* Loop_End follows the last instruction in the loop. Adjust label address. */ if (maybe_end) - line_label->sy_value.X_add_number -= last_insn_size; - + ((struct local_symbol *) line_label)->lsy_value -= last_insn_size; } /* Special extra functions that help bfin-parse.y perform its job. */ @@ -1878,15 +1879,17 @@ bfin_gen_loop (Expr_Node *expr, REG_T reg, int rop, REG_T preg) Expr_Node *lbegin, *lend; loopsym = expr->value.s_value; - lbeginsym = (char *) xmalloc (strlen (loopsym) + strlen ("__BEGIN") + 1); - lendsym = (char *) xmalloc (strlen (loopsym) + strlen ("__END") + 1); + lbeginsym = (char *) xmalloc (strlen (loopsym) + strlen ("__BEGIN") + 5); + lendsym = (char *) xmalloc (strlen (loopsym) + strlen ("__END") + 5); lbeginsym[0] = 0; lendsym[0] = 0; + strcat (lbeginsym, "L$L$"); strcat (lbeginsym, loopsym); strcat (lbeginsym, "__BEGIN"); + strcat (lendsym, "L$L$"); strcat (lendsym, loopsym); strcat (lendsym, "__END"); |