diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-12-23 17:05:01 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2016-12-23 19:37:13 +0000 |
commit | d8722d7641d234dcd3d1f2254fbc5d9cf234e4e6 (patch) | |
tree | 14e776f31302da5b1f23383fd025d6db926bede6 /gas | |
parent | 0674ee5dada21c8deec690ca66d5b2870f13ea49 (diff) | |
download | gdb-d8722d7641d234dcd3d1f2254fbc5d9cf234e4e6.zip gdb-d8722d7641d234dcd3d1f2254fbc5d9cf234e4e6.tar.gz gdb-d8722d7641d234dcd3d1f2254fbc5d9cf234e4e6.tar.bz2 |
MIPS16: Reassign `0' and `4' operand codes
Replace `0' and `4' operand codes with `.' and `F' respectively to free
up the `0'-`4' consecutive range. No functional change.
gas/
* config/tc-mips.c (mips16_macro_build): Replace `0' and `4'
operand codes with `.' and `F' respectively.
(mips16_macro): Likewise.
include/
* opcode/mips.h: Replace `0' and `4' operand codes with `.' and
`F' respectively.
opcodes/
* mips16-opc.c (decode_mips16_operand): Replace `0' and `4'
operand codes with `.' and `F' respectively.
(mips16_opcodes): Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 10 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2a2fafb..b181f0c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2016-12-23 Maciej W. Rozycki <macro@imgtec.com> + * config/tc-mips.c (mips16_macro_build): Replace `0' and `4' + operand codes with `.' and `F' respectively. + (mips16_macro): Likewise. + +2016-12-23 Maciej W. Rozycki <macro@imgtec.com> + * config/tc-mips.c (is_size_valid_16): Disallow a `.e' suffix instruction size override for INSN2_SHORT_ONLY opcode table entries. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 562da64..e6b8c1b 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -8758,15 +8758,15 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt, case ')': break; - case '0': + case '.': case 'S': case 'P': case 'R': break; case '<': - case '4': case '5': + case 'F': case 'H': case 'W': case 'D': @@ -13531,7 +13531,7 @@ mips16_macro (struct mips_cl_insn *ip) s = "mfhi"; do_div3: start_noreorder (); - macro_build (NULL, dbl ? "ddiv" : "div", "0,x,y", op[1], op[2]); + macro_build (NULL, dbl ? "ddiv" : "div", ".,x,y", op[1], op[2]); expr1.X_add_number = 2; macro_build (&expr1, "bnez", "x,p", op[2]); macro_build (NULL, "break", "6", 7); @@ -13561,7 +13561,7 @@ mips16_macro (struct mips_cl_insn *ip) s2 = "mfhi"; do_divu3: start_noreorder (); - macro_build (NULL, s, "0,x,y", op[1], op[2]); + macro_build (NULL, s, ".,x,y", op[1], op[2]); expr1.X_add_number = 2; macro_build (&expr1, "bnez", "x,p", op[2]); macro_build (NULL, "break", "6", 7); @@ -13583,7 +13583,7 @@ mips16_macro (struct mips_cl_insn *ip) case M_SUBU_I: do_subu: imm_expr.X_add_number = -imm_expr.X_add_number; - macro_build (&imm_expr, dbl ? "daddiu" : "addiu", "y,x,4", op[0], op[1]); + macro_build (&imm_expr, dbl ? "daddiu" : "addiu", "y,x,F", op[0], op[1]); break; case M_SUBU_I_2: |