+2020-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2020-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/93202
+ * config/riscv/riscv.c (riscv_print_operand_reloc): Use
+ output_operand_lossage instead of gcc_unreachable.
+ * doc/md.texi (riscv f constraint): Fix typo.
+
2020-01-22 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
break;
default:
- gcc_unreachable ();
+ output_operand_lossage ("invalid use of '%%%c'", hi_reloc ? 'h' : 'R');
+ return;
}
fprintf (file, "%s(", reloc);
@table @code
@item f
-A floating-point register (if availiable).
+A floating-point register (if available).
@item I
An I-type 12-bit signed immediate.
+2020-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2020-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/93202
+ * gcc.target/riscv/pr93202.c: New test.
+
2020-01-22 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
--- /dev/null
+/* PR inline-asm/93202 */
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-fpic" } */
+
+void
+foo (void)
+{
+ asm volatile ("%h0" :: "i" (&foo)); /* { dg-error "invalid use of '%h'" } */
+ asm volatile ("%R0" :: "i" (&foo)); /* { dg-error "invalid use of '%R'" } */
+}