diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-05-02 22:30:11 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-05-02 22:30:11 +0000 |
commit | 754e2bb9487bca613fbcf442e982d8842d81ad29 (patch) | |
tree | b38f14c65169892ca50767770657cbd01570113e /gas/config/tc-mips.c | |
parent | 13761a1136a46a4dec5d01e00743e8b267a23c0d (diff) | |
download | gdb-754e2bb9487bca613fbcf442e982d8842d81ad29.zip gdb-754e2bb9487bca613fbcf442e982d8842d81ad29.tar.gz gdb-754e2bb9487bca613fbcf442e982d8842d81ad29.tar.bz2 |
gas/
* config/tc-mips.c (mips_pseudo_table): Add stabd and stabs entries.
(s_mips_stab): Do not restrict to stabn only.
gas/testsuite/
* gas/mips/mips16-stabs.s, gas/mips/mips16-stabs.d: New test.
* gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 29d2c02..012935d 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1472,7 +1472,9 @@ static const pseudo_typeS mips_pseudo_table[] = {"section", s_change_section, 0}, {"short", s_cons, 1}, {"single", s_float_cons, 'f'}, + {"stabd", s_mips_stab, 'd'}, {"stabn", s_mips_stab, 'n'}, + {"stabs", s_mips_stab, 's'}, {"text", s_change_sec, 't'}, {"word", s_cons, 2}, @@ -17088,18 +17090,24 @@ s_insn (int ignore ATTRIBUTE_UNUSED) demand_empty_rest_of_line (); } -/* Handle a .stabn directive. We need these in order to mark a label - as being a mips16 text label correctly. Sometimes the compiler - will emit a label, followed by a .stabn, and then switch sections. - If the label and .stabn are in mips16 mode, then the label is - really a mips16 text label. */ +/* Handle a .stab[snd] directive. Ideally these directives would be + implemented in a transparent way, so that removing them would not + have any effect on the generated instructions. However, s_stab + internally changes the section, so in practice we need to decide + now whether the preceding label marks compressed code. We do not + support changing the compression mode of a label after a .stab* + directive, such as in: + + foo: + .stabs ... + .set mips16 + + so the current mode wins. */ static void s_mips_stab (int type) { - if (type == 'n') - mips_mark_labels (); - + mips_mark_labels (); s_stab (type); } |