diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-02-12 20:00:15 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-02-12 20:00:15 +0000 |
commit | ed3eb78691406929f68285b0e8dc392e81bf8145 (patch) | |
tree | 810ffce95c8d21b9222ad6fe3be0fb57263a5ce2 /gas | |
parent | ebf2837264620b3109bf098d288ecc02e58b50a0 (diff) | |
download | gdb-ed3eb78691406929f68285b0e8dc392e81bf8145.zip gdb-ed3eb78691406929f68285b0e8dc392e81bf8145.tar.gz gdb-ed3eb78691406929f68285b0e8dc392e81bf8145.tar.bz2 |
* config/tc-mips.c (mips_pseudo_table): Add "insn".
(s_insn): New static function.
* doc/c-mips.texi: Document .insn.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 34 |
2 files changed, 38 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 67472df..0afe16e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ Wed Feb 12 14:36:29 1997 Ian Lance Taylor <ian@cygnus.com> + * config/tc-mips.c (mips_pseudo_table): Add "insn". + (s_insn): New static function. + * doc/c-mips.texi: Document .insn. + * config/tc-mips.c (md_begin): Add the general registers to the symbol table. (mips16_ip): First parse the expression, and then see whether it diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index f84d781..6830198 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -548,6 +548,7 @@ static void s_cpload PARAMS ((int)); static void s_cprestore PARAMS ((int)); static void s_gpword PARAMS ((int)); static void s_cpadd PARAMS ((int)); +static void s_insn PARAMS ((int)); static void md_obj_begin PARAMS ((void)); static void md_obj_end PARAMS ((void)); static long get_number PARAMS ((void)); @@ -587,6 +588,7 @@ static const pseudo_typeS mips_pseudo_table[] = {"cprestore", s_cprestore, 0}, {"gpword", s_gpword, 0}, {"cpadd", s_cpadd, 0}, + {"insn", s_insn, 0}, /* Relatively generic pseudo-ops that happen to be used on MIPS chips. */ @@ -9215,6 +9217,38 @@ s_cpadd (ignore) demand_empty_rest_of_line (); } +/* Handle the .insn pseudo-op. This marks instruction labels in + mips16 mode. This permits the linker to handle them specially, + such as generating jalx instructions when needed. We also make + them odd for the duration of the assembly, in order to generate the + right sort of code. We will make them even in the adjust_symtab + routine, while leaving them marked. This is convenient for the + debugger and the disassembler. The linker knows to make them odd + again. */ + +static void +s_insn (ignore) + int ignore; +{ + if (mips16) + { + struct insn_label_list *l; + + for (l = insn_labels; l != NULL; l = l->next) + { +#ifdef S_SET_OTHER + if (OUTPUT_FLAVOR == bfd_target_elf_flavour) + S_SET_OTHER (l->label, STO_MIPS16); +#endif + ++l->label->sy_value.X_add_number; + } + + mips_clear_insn_labels (); + } + + demand_empty_rest_of_line (); +} + /* Parse a register string into a number. Called from the ECOFF code to parse .frame. The argument is non-zero if this is the frame register, so that we can record it in mips_frame_reg. */ |