From 40f12533831101e95be7921d126e66f038222b17 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 7 Apr 2008 13:07:16 +0000 Subject: [PATCH] gas/ 2008-04-07 H.J. Lu * config/tc-i386.c (parse_real_register): Return AVX register only if AVX is enabled. gas/testsuite/ 2008-04-07 H.J. Lu * gas/i386/att-regs.s: Add AVX register test. * gas/i386/intel-regs.s: Likewise. * gas/i386/att-regs.d: Updated. * gas/i386/intel-regs.d: Likewise. --- gas/ChangeLog | 5 +++++ gas/config/tc-i386.c | 3 +++ gas/testsuite/ChangeLog | 8 ++++++++ gas/testsuite/gas/i386/att-regs.d | 1 + gas/testsuite/gas/i386/att-regs.s | 3 +++ gas/testsuite/gas/i386/intel-regs.d | 1 + gas/testsuite/gas/i386/intel-regs.s | 3 +++ 7 files changed, 24 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index c308c82c4dd..3ea6ff1b7d8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2008-04-07 H.J. Lu + + * config/tc-i386.c (parse_real_register): Return AVX register + only if AVX is enabled. + 2008-04-07 Kaz Kojima PR gas/6043 diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 4426697003c..f6b3909cb39 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -7685,6 +7685,9 @@ parse_real_register (char *reg_string, char **end_op) if (r->reg_type.bitfield.regxmm && !cpu_arch_flags.bitfield.cpusse) return (const reg_entry *) NULL; + if (r->reg_type.bitfield.regymm && !cpu_arch_flags.bitfield.cpuavx) + return (const reg_entry *) NULL; + /* Don't allow fake index register unless allow_index_reg isn't 0. */ if (!allow_index_reg && (r->reg_num == RegEiz || r->reg_num == RegRiz)) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 65c19a3ef77..89280ccc5a2 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2008-04-07 H.J. Lu + + * gas/i386/att-regs.s: Add AVX register test. + * gas/i386/intel-regs.s: Likewise. + + * gas/i386/att-regs.d: Updated. + * gas/i386/intel-regs.d: Likewise. + 2008-04-07 Kaz Kojima PR gas/6043 diff --git a/gas/testsuite/gas/i386/att-regs.d b/gas/testsuite/gas/i386/att-regs.d index 6ab9d28f5d4..384e7898965 100644 --- a/gas/testsuite/gas/i386/att-regs.d +++ b/gas/testsuite/gas/i386/att-regs.d @@ -34,6 +34,7 @@ Disassembly of section \.text: .*:[ ]+dd c0[ ]+ffree[ ]+%st(\(0\))? .*:[ ]+0f ef c0[ ]+pxor[ ]+%mm0,%mm0 .*:[ ]+0f 57 c0[ ]+xorps[ ]+%xmm0,%xmm0 +.*:[ ]+c5 fc 57 c0[ ]+vxorps[ ]+%ymm0,%ymm0,%ymm0 .*:[ ]+44[ ]+inc %esp .*:[ ]+88 c0[ ]+mov[ ]+%al,%al .*:[ ]+66 44[ ]+inc[ ]+%sp diff --git a/gas/testsuite/gas/i386/att-regs.s b/gas/testsuite/gas/i386/att-regs.s index b966509a96b..f58deec27e8 100644 --- a/gas/testsuite/gas/i386/att-regs.s +++ b/gas/testsuite/gas/i386/att-regs.s @@ -42,6 +42,9 @@ .arch .sse xorps xmm0, xmm0 + .arch .avx + vxorps ymm0, ymm0, ymm0 + .arch generic64 .code64 mov r8b, axl diff --git a/gas/testsuite/gas/i386/intel-regs.d b/gas/testsuite/gas/i386/intel-regs.d index cf52161064b..0ecc9f684b9 100644 --- a/gas/testsuite/gas/i386/intel-regs.d +++ b/gas/testsuite/gas/i386/intel-regs.d @@ -34,6 +34,7 @@ Disassembly of section \.text: .*:[ ]+dd c0[ ]+ffree[ ]+%st(\(0\))? .*:[ ]+0f ef c0[ ]+pxor[ ]+%mm0,%mm0 .*:[ ]+0f 57 c0[ ]+xorps[ ]+%xmm0,%xmm0 +.*:[ ]+c5 fc 57 c0[ ]+vxorps[ ]+%ymm0,%ymm0,%ymm0 .*:[ ]+44[ ]+inc %esp .*:[ ]+88 c0[ ]+mov[ ]+%al,%al .*:[ ]+66 44[ ]+inc[ ]+%sp diff --git a/gas/testsuite/gas/i386/intel-regs.s b/gas/testsuite/gas/i386/intel-regs.s index df5baf21d7f..546e196a447 100644 --- a/gas/testsuite/gas/i386/intel-regs.s +++ b/gas/testsuite/gas/i386/intel-regs.s @@ -42,6 +42,9 @@ .arch .sse xorps xmm0, xmm0 + .arch .avx + vxorps ymm0, ymm0, ymm0 + .arch generic64 .code64 mov axl, r8b -- 2.30.2