From d946b91f6731245710d0cf1cb5b79e9de02c4a92 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 5 Sep 2007 13:36:14 +0000 Subject: [PATCH] 2007-09-05 H.J. Lu * config/tc-i386.c (i386_index_check): Don't use RegRex on the reg_type field. (parse_real_register): Use `||' instead of `|'. --- gas/ChangeLog | 6 ++++++ gas/config/tc-i386.c | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 719d5b3473d..155a077b78b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-09-05 H.J. Lu + + * config/tc-i386.c (i386_index_check): Don't use RegRex + on the reg_type field. + (parse_real_register): Use `||' instead of `|'. + 2007-09-04 H.J. Lu * config/tc-i386.c (process_operands): Remove segment override diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 9a39d4309b8..a5ac843c96b 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4981,7 +4981,7 @@ i386_index_check (const char *operand_string) { /* 16bit checks. */ if ((i.base_reg - && ((i.base_reg->reg_type & (Reg16 | BaseIndex | RegRex)) + && ((i.base_reg->reg_type & (Reg16 | BaseIndex)) != (Reg16 | BaseIndex))) || (i.index_reg && (((i.index_reg->reg_type & (Reg16 | BaseIndex)) @@ -4996,9 +4996,9 @@ i386_index_check (const char *operand_string) { /* 32bit checks. */ if ((i.base_reg - && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32) + && (i.base_reg->reg_type & Reg32) != Reg32) || (i.index_reg - && ((i.index_reg->reg_type & (Reg32 | BaseIndex | RegRex)) + && ((i.index_reg->reg_type & (Reg32 | BaseIndex)) != (Reg32 | BaseIndex)))) ok = 0; } @@ -5885,7 +5885,8 @@ parse_real_register (char *reg_string, char **end_op) } if (r != NULL - && ((r->reg_flags & (RegRex64 | RegRex)) | (r->reg_type & Reg64)) != 0 + && ((r->reg_flags & (RegRex64 | RegRex)) + || (r->reg_type & Reg64)) && (r->reg_type != Control || !(cpu_arch_flags & CpuSledgehammer)) && flag_code != CODE_64BIT) return (const reg_entry *) NULL; -- 2.30.2