diff options
author | Catherine Moore <clm@redhat.com> | 2013-05-31 17:04:53 +0000 |
---|---|---|
committer | Catherine Moore <clm@redhat.com> | 2013-05-31 17:04:53 +0000 |
commit | a3f278e22a8dcc933aae2d3e705c06615887a36d (patch) | |
tree | 6550165e81666c9486d58a8f482ed1f67d4aac0d /gas/config/tc-mips.c | |
parent | 3ca73e0c7da927485513b59c88dbc1b37502c1bd (diff) | |
download | gdb-a3f278e22a8dcc933aae2d3e705c06615887a36d.zip gdb-a3f278e22a8dcc933aae2d3e705c06615887a36d.tar.gz gdb-a3f278e22a8dcc933aae2d3e705c06615887a36d.tar.bz2 |
2013-05-31 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-mips.c (s_ehword): New.
2013-05-31 Catherine Moore <clm@codesourcery.com>
gas/testsuite/
* gas/mips/ehword.d: New.
* gas/mips/ehword.s: New.
* gas/mips/mips.exp: Run ehword test.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 02b3cf3..0e2e5f7 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1368,6 +1368,7 @@ static void s_tpreldword (int); static void s_gpvalue (int); static void s_gpword (int); static void s_gpdword (int); +static void s_ehword (int); static void s_cpadd (int); static void s_insn (int); static void md_obj_begin (void); @@ -1450,6 +1451,7 @@ static const pseudo_typeS mips_pseudo_table[] = {"gpvalue", s_gpvalue, 0}, {"gpword", s_gpword, 0}, {"gpdword", s_gpdword, 0}, + {"ehword", s_ehword, 0}, {"cpadd", s_cpadd, 0}, {"insn", s_insn, 0}, @@ -17155,6 +17157,34 @@ s_gpdword (int ignore ATTRIBUTE_UNUSED) demand_empty_rest_of_line (); } +/* Handle the .ehword pseudo-op. This is used when generating unwinding + tables. It generates a R_MIPS_EH reloc. */ + +static void +s_ehword (int ignore ATTRIBUTE_UNUSED) +{ + expressionS ex; + char *p; + + mips_emit_delays (); + + expression (&ex); + mips_clear_insn_labels (); + + if (ex.X_op != O_symbol || ex.X_add_number != 0) + { + as_bad (_("Unsupported use of .ehword")); + ignore_rest_of_line (); + } + + p = frag_more (4); + md_number_to_chars (p, 0, 4); + fix_new_exp (frag_now, p - frag_now->fr_literal, 4, &ex, FALSE, + BFD_RELOC_MIPS_EH); + + demand_empty_rest_of_line (); +} + /* Handle the .cpadd pseudo-op. This is used when dealing with switch tables in SVR4 PIC code. */ |