[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/13509] branch target to the wrong location
From: |
pinskia at gcc dot gnu.org |
Subject: |
[Bug gas/13509] branch target to the wrong location |
Date: |
Sat, 17 Dec 2011 00:38:56 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13509
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-17
00:38:56 UTC ---
Something like:
Index: config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.500
diff -u -p -r1.500 tc-mips.c
--- config/tc-mips.c 8 Dec 2011 20:47:25 -0000 1.500
+++ config/tc-mips.c 17 Dec 2011 00:38:28 -0000
@@ -15633,7 +15633,7 @@ get_symbol (void)
label. */
static void
-mips_align (int to, int *fill, symbolS *label)
+mips_align (int to, int *fill, struct insn_label_list *labels)
{
mips_emit_delays ();
mips_record_compressed_mode ();
@@ -15642,11 +15642,13 @@ mips_align (int to, int *fill, symbolS *
else
frag_align (to, fill ? *fill : 0, 0);
record_alignment (now_seg, to);
- if (label != NULL)
+ while (labels != NULL)
{
+ symbolS *label = labels->label;
gas_assert (S_GET_SEGMENT (label) == now_seg);
symbol_set_frag (label, frag_now);
S_SET_VALUE (label, (valueT) frag_now_fix ());
+ labels = labels->next;
}
}
@@ -15689,7 +15691,7 @@ s_align (int x ATTRIBUTE_UNUSED)
struct insn_label_list *l = si->label_list;
/* Auto alignment should be switched on by next section change. */
auto_align = 1;
- mips_align (temp, fill_ptr, l != NULL ? l->label : NULL);
+ mips_align (temp, fill_ptr, l);
}
else
{
@@ -15859,12 +15861,10 @@ s_cons (int log_size)
{
segment_info_type *si = seg_info (now_seg);
struct insn_label_list *l = si->label_list;
- symbolS *label;
- label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (log_size > 0 && auto_align)
- mips_align (log_size, 0, label);
+ mips_align (log_size, 0, l);
cons (1 << log_size);
mips_clear_insn_labels ();
}
@@ -15874,18 +15874,15 @@ s_float_cons (int type)
{
segment_info_type *si = seg_info (now_seg);
struct insn_label_list *l = si->label_list;
- symbolS *label;
-
- label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (auto_align)
{
if (type == 'd')
- mips_align (3, 0, label);
+ mips_align (3, 0, l);
else
- mips_align (2, 0, label);
+ mips_align (2, 0, l);
}
float_cons (type);
@@ -16653,7 +16650,6 @@ s_gpword (int ignore ATTRIBUTE_UNUSED)
{
segment_info_type *si;
struct insn_label_list *l;
- symbolS *label;
expressionS ex;
char *p;
@@ -16666,10 +16662,9 @@ s_gpword (int ignore ATTRIBUTE_UNUSED)
si = seg_info (now_seg);
l = si->label_list;
- label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (auto_align)
- mips_align (2, 0, label);
+ mips_align (2, 0, l);
expression (&ex);
mips_clear_insn_labels ();
@@ -16693,7 +16688,6 @@ s_gpdword (int ignore ATTRIBUTE_UNUSED)
{
segment_info_type *si;
struct insn_label_list *l;
- symbolS *label;
expressionS ex;
char *p;
@@ -16706,10 +16700,9 @@ s_gpdword (int ignore ATTRIBUTE_UNUSED)
si = seg_info (now_seg);
l = si->label_list;
- label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (auto_align)
- mips_align (3, 0, label);
+ mips_align (3, 0, l);
expression (&ex);
mips_clear_insn_labels ();
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug gas/13509] New: branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/15
- [Bug gas/13509] branch target to the wrong location, amodra at gmail dot com, 2011/12/16
- [Bug gas/13509] branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/16
- [Bug gas/13509] branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/16
- [Bug gas/13509] branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/16
- [Bug gas/13509] branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/16
- [Bug gas/13509] branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/16
- [Bug gas/13509] branch target to the wrong location, pinskia at gcc dot gnu.org, 2011/12/16
- [Bug gas/13509] branch target to the wrong location,
pinskia at gcc dot gnu.org <=