+2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
+
+ * config/tc-mips.c (match_mips16_insn): Call
+ `match_not_constant' for a disallowed relocation operation.
+ * testsuite/gas/mips/mips16-reloc-error.d: New test.
+ * testsuite/gas/mips/mips16-reloc-error.l: New stderr output.
+ * testsuite/gas/mips/mips16-reloc-error.s: New test source.
+ * testsuite/gas/mips/mips.exp: Run the new test.
+
2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
* testsuite/gas/mips/lui-1.d: New test.
--- /dev/null
+.*: Assembler messages:
+.*:11: Error: operand 3 must be constant `addiu \$3,\$2,%lo\(bar\)'
+.*:12: Error: operand 3 must be constant `daddiu \$3,\$2,%lo\(bar\)'
+.*:14: Error: operand 2 must be constant `slti \$3,%lo\(bar\)'
+.*:15: Error: operand 2 must be constant `sltiu \$3,%lo\(bar\)'
+.*:17: Error: operand 3 must be constant `sll \$3,\$2,%lo\(bar\)'
+.*:18: Error: operand 3 must be constant `sra \$3,\$2,%lo\(bar\)'
+.*:19: Error: operand 3 must be constant `srl \$3,\$2,%lo\(bar\)'
+.*:20: Error: operand 3 must be constant `dsll \$3,\$2,%lo\(bar\)'
+.*:21: Error: operand 2 must be constant `dsra \$3,%lo\(bar\)'
+.*:22: Error: operand 2 must be constant `dsrl \$3,%lo\(bar\)'
+.*:24: Error: operand 1 must be constant `break %lo\(bar\)'
+.*:25: Error: operand 1 must be constant `sdbbp %lo\(bar\)'
+.*:27: Error: invalid operands `b %lo\(bar\)'
+.*:28: Error: invalid operands `beqz \$3,%lo\(bar\)'
+.*:29: Error: invalid operands `bnez \$3,%lo\(bar\)'
+.*:30: Error: invalid operands `bteqz %lo\(bar\)'
+.*:31: Error: invalid operands `btnez %lo\(bar\)'
+.*:33: Error: invalid operands `jal %lo\(bar\)'
+.*:34: Error: invalid operands `jalx %lo\(bar\)'
+.*:36: Error: operand 3 must be constant `save \$31,\$16,%lo\(bar\)'
+.*:37: Error: operand 3 must be constant `restore \$31,\$16,%lo\(bar\)'
+.*:39: Error: operand 6 must be constant `asmacro 0,0,0,0,0,%lo\(bar\)'
+.*:40: Error: operand 5 must be constant `asmacro 0,0,0,0,%lo\(bar\),0'
+.*:41: Error: operand 4 must be constant `asmacro 0,0,0,%lo\(bar\),0,0'
+.*:42: Error: operand 3 must be constant `asmacro 0,0,%lo\(bar\),0,0,0'
+.*:43: Error: operand 2 must be constant `asmacro 0,%lo\(bar\),0,0,0,0'
+.*:44: Error: operand 1 must be constant `asmacro %lo\(bar\),0,0,0,0,0'
--- /dev/null
+ .text
+
+ .set bar, 8
+
+ .ent foo
+ .set mips16
+foo:
+ li $2, %hi(bar)
+ sll $2, $2, 16
+
+ addiu $3, $2, %lo(bar)
+ daddiu $3, $2, %lo(bar)
+
+ slti $3, %lo(bar)
+ sltiu $3, %lo(bar)
+
+ sll $3, $2, %lo(bar)
+ sra $3, $2, %lo(bar)
+ srl $3, $2, %lo(bar)
+ dsll $3, $2, %lo(bar)
+ dsra $3, %lo(bar)
+ dsrl $3, %lo(bar)
+
+ break %lo(bar)
+ sdbbp %lo(bar)
+
+ b %lo(bar)
+ beqz $3, %lo(bar)
+ bnez $3, %lo(bar)
+ bteqz %lo(bar)
+ btnez %lo(bar)
+
+ jal %lo(bar)
+ jalx %lo(bar)
+
+ save $31, $16, %lo(bar)
+ restore $31, $16, %lo(bar)
+
+ asmacro 0, 0, 0, 0, 0, %lo(bar)
+ asmacro 0, 0, 0, 0, %lo(bar), 0
+ asmacro 0, 0, 0, %lo(bar), 0, 0
+ asmacro 0, 0, %lo(bar), 0, 0, 0
+ asmacro 0, %lo(bar), 0, 0, 0, 0
+ asmacro %lo(bar), 0, 0, 0, 0, 0
+
+ nop
+ .set nomips16
+ .end foo
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16