#include "i386-expand.h"
#include "i386-features.h"
#include "function-abi.h"
+#include "rtl-error.h"
/* This file should be included last. */
#include "target-def.h"
}
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
- warning (0, "non-integer operand used with operand code %<z%>");
+ {
+ if (this_is_asm_operands)
+ warning_for_asm (this_is_asm_operands,
+ "non-integer operand used with operand code %<z%>");
+ else
+ warning (0, "non-integer operand used with operand code %<z%>");
+ }
/* FALLTHRU */
case 'Z':
else
{
output_operand_lossage ("invalid operand type used with "
- "operand code 'Z'");
+ "operand code '%c'", code);
return;
}
- output_operand_lossage ("invalid operand size for operand code 'Z'");
+ output_operand_lossage ("invalid operand size for operand code '%c'",
+ code);
return;
case 'd':
--- /dev/null
+/* PR target/109458 */
+/* { dg-do compile } */
+/* { dg-options "-msse2" } */
+
+void
+foo (_Float16 x)
+{
+ asm volatile ("# %z0" : : "i" (42)); /* { dg-error "invalid 'asm': invalid operand type used with operand code 'z'" } */
+ asm volatile ("# %Z0" : : "i" (42)); /* { dg-error "invalid 'asm': invalid operand type used with operand code 'Z'" } */
+ asm volatile ("# %z0" : : "x" (x)); /* { dg-error "invalid 'asm': invalid operand size for operand code 'z'" } */
+ /* { dg-warning "non-integer operand used with operand code 'z'" "" { target *-*-* } .-1 } */
+ asm volatile ("# %Z0" : : "x" (x)); /* { dg-error "invalid 'asm': invalid operand size for operand code 'Z'" } */
+}