This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] MIPS/GAS: Use symbol_temp_new_now() to create a fake label
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>, Catherine Moore <clm at codesourcery dot com>, gnu-mips-sgxx at codesourcery dot com
- Date: Mon, 26 Jul 2010 11:48:42 +0100 (BST)
- Subject: [PATCH] MIPS/GAS: Use symbol_temp_new_now() to create a fake label
Hi,
While making other changes I've noticed mips_ip() creates fake labels
manually. There's no need to do so as a helper is available and it's
better to have a given action made in a single place in case it needs to
be modified anyhow in the future. This helper is already used in
s_mips_end() and the change should be rather obvious.
Regression-tested succesfully on mips-sde-elf and mips-linux-gnu targets.
2010-07-26 Maciej W. Rozycki <macro@codesourcery.com>
gas/
* config/tc-mips.c (mips_ip): Use symbol_temp_new_now to create
a fake label.
OK to apply?
Maciej
binutils-mips-symbol-temp.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c 2010-07-25 23:54:03.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c 2010-07-25 23:54:06.000000000 +0100
@@ -9960,9 +9960,7 @@ do_msbd:
/* Set the argument to the current address in the
section. */
offset_expr.X_op = O_symbol;
- offset_expr.X_add_symbol =
- symbol_new ("L0\001", now_seg,
- (valueT) frag_now_fix (), frag_now);
+ offset_expr.X_add_symbol = symbol_temp_new_now ();
offset_expr.X_add_number = 0;
/* Put the floating point number into the section. */