+2019-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/24353
+ * config/tc-i386.c: Include <limits.h> if it exists and try
+ including <sys/param.h> if we have it.
+ (INT_MAX): Define if not defined.
+ (md_parse_option): Set optimize to INT_MAX for -Os.
+ * testsuite/gas/i386/optimize-2.s: Add a test.
+ * testsuite/gas/i386/x86-64-optimize-3.s: Likewise.
+ * testsuite/gas/i386/optimize-2.d: Updated.
+ * testsuite/gas/i386/x86-64-optimize-3.d: Likewise.
+
2019-03-17 H.J. Lu <hongjiu.lu@intel.com>
PR gas/24352
#include "elf/x86-64.h"
#include "opcodes/i386-init.h"
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#else
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifndef INT_MAX
+#define INT_MAX (int) (((unsigned) (-1)) >> 1)
+#endif
+#endif
+
#ifndef REGISTER_WARNINGS
#define REGISTER_WARNINGS 1
#endif
{
optimize_for_space = 1;
/* Turn on all encoding optimizations. */
- optimize = -1;
+ optimize = INT_MAX;
}
else
{
+[a-f0-9]+: f6 c3 7f test \$0x7f,%bl
+[a-f0-9]+: f7 c7 7f 00 00 00 test \$0x7f,%edi
+[a-f0-9]+: 66 f7 c7 7f 00 test \$0x7f,%di
+ +[a-f0-9]+: c5 f1 55 e9 vandnpd %xmm1,%xmm1,%xmm5
#pass
test $0x7f, %bl
test $0x7f, %edi
test $0x7f, %di
+
+ vandnpd %zmm1, %zmm1, %zmm5
+[a-f0-9]+: 41 f6 c1 7f test \$0x7f,%r9b
+[a-f0-9]+: 41 f6 c1 7f test \$0x7f,%r9b
+[a-f0-9]+: 41 f6 c1 7f test \$0x7f,%r9b
+ +[a-f0-9]+: c5 f1 55 e9 vandnpd %xmm1,%xmm1,%xmm5
#pass
test $0x7f, %r9d
test $0x7f, %r9w
test $0x7f, %r9b
+
+ vandnpd %zmm1, %zmm1, %zmm5