+2020-06-08 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (check_register): Split RegTR handling, to
+ fail recognition also in 64-bit mode as well as with i586 or
+ i686 explicitly enabled.
+ * testsuite/gas/i386/x86_64.s: Add insns referencing tr<N>.
+ * testsuite/gas/i386/x86_64-intel.d,
+ testsuite/gas/i386/x86_64.d: Adjust expectations.
+
2020-06-08 Jan Beulich <jbeulich@suse.com>
* testsuite/gas/cfi/cfi-i386-2.d: Adjust expectations.
if ((r->reg_type.bitfield.dword
|| (r->reg_type.bitfield.class == SReg && r->reg_num > 3)
|| r->reg_type.bitfield.class == RegCR
- || r->reg_type.bitfield.class == RegDR
- || r->reg_type.bitfield.class == RegTR)
+ || r->reg_type.bitfield.class == RegDR)
&& !cpu_arch_flags.bitfield.cpui386)
return FALSE;
+ if (r->reg_type.bitfield.class == RegTR
+ && (flag_code == CODE_64BIT
+ || !cpu_arch_flags.bitfield.cpui386
+ || cpu_arch_isa_flags.bitfield.cpui586
+ || cpu_arch_isa_flags.bitfield.cpui686))
+ return FALSE;
+
if (r->reg_type.bitfield.class == RegMMX && !cpu_arch_flags.bitfield.cpummx)
return FALSE;
[ ]*[a-f0-9]+: 48 0f b7 00 movzx rax,WORD PTR \[rax\]
[ ]*[a-f0-9]+: 0f c3 00 movnti DWORD PTR \[rax\],eax
[ ]*[a-f0-9]+: 48 0f c3 00 movnti QWORD PTR \[rax\],rax
+[ ]*[a-f0-9]+: 8b 04 25 00 00 00 00 mov eax,DWORD PTR (ds:)?0x0
+[ ]*[a-f0-9]+: 48 89 0c 25 00 00 00 00 mov QWORD PTR (ds:)?0x0,rcx
#pass
[ ]*[a-f0-9]+: 48 0f b7 00 movzwq \(%rax\),%rax
[ ]*[a-f0-9]+: 0f c3 00 movnti %eax,\(%rax\)
[ ]*[a-f0-9]+: 48 0f c3 00 movnti %rax,\(%rax\)
+[ ]*[a-f0-9]+: 8b 04 25 00 00 00 00 mov 0x0,%eax
+[ ]*[a-f0-9]+: 48 89 0c 25 00 00 00 00 mov %rcx,0x0
#pass
movnti dword ptr [rax], eax
movnti qword ptr [rax], rax
+
+mov eax, tr1
+mov tr0, rcx