This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Remove memory check on SVME instructions
- From: "H.J. Lu" <hjl at lucon dot org>
- To: "rajagopal, dwarak" <dwarak dot rajagopal at amd dot com>
- Cc: "Meissner, Michael" <michael dot meissner at amd dot com>, "Harle, Christophe" <christophe dot harle at amd dot com>, binutils at sources dot redhat dot com
- Date: Tue, 4 Sep 2007 07:08:48 -0700
- Subject: PATCH: Remove memory check on SVME instructions
- References: <20070830163046.GA21146@lucon.org> <6096959DEF5C9447A6BF80BDC7EB9EDC061560C5@SBOSEXMB1.amd.com> <9E1304B144EBEB4C97F4162BFAC478862124F9@SAUSEXMB2.amd.com>
On Thu, Aug 30, 2007 at 07:19:02PM -0500, rajagopal, dwarak wrote:
> H.J.,
>
> Yes, SVM instructions have register only operand. So please fix this.
>
> Thanks,
> Dwarak
>
I am checking this patch to remove memory check on SVME instructions.
H.J.
---
2007-09-04 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (process_operands): Remove segment override
check on SVME instructions.
(i386_index_check): Remove memory operand check on SVME
instructions.
--- gas/config/tc-i386.c.bar 2007-08-28 21:59:04.000000000 -0700
+++ gas/config/tc-i386.c 2007-09-04 07:04:48.000000000 -0700
@@ -3477,9 +3477,9 @@ process_operands (void)
default_seg = &ds;
}
- if ((i.tm.base_opcode == 0x8d /* lea */
- || (i.tm.cpu_flags & CpuSVME))
- && i.seg[0] && !quiet_warnings)
+ if (i.tm.base_opcode == 0x8d /* lea */
+ && i.seg[0]
+ && !quiet_warnings)
as_warn (_("segment override on `%s' is ineffectual"), i.tm.name);
/* If a segment was explicitly specified, and the specified segment
@@ -4962,30 +4962,7 @@ i386_index_check (const char *operand_st
tryprefix:
#endif
ok = 1;
- if ((current_templates->start->cpu_flags & CpuSVME)
- && current_templates->end[-1].operand_types[0] == AnyMem)
- {
- /* Memory operands of SVME insns are special in that they only allow
- rAX as their memory address and ignore any segment override. */
- unsigned RegXX;
-
- /* SKINIT is even more restrictive: it always requires EAX. */
- if (strcmp (current_templates->start->name, "skinit") == 0)
- RegXX = Reg32;
- else if (flag_code == CODE_64BIT)
- RegXX = i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32;
- else
- RegXX = ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)
- ? Reg16
- : Reg32);
- if (!i.base_reg
- || !(i.base_reg->reg_type & Acc)
- || !(i.base_reg->reg_type & RegXX)
- || i.index_reg
- || (i.types[0] & Disp))
- ok = 0;
- }
- else if (flag_code == CODE_64BIT)
+ if (flag_code == CODE_64BIT)
{
unsigned RegXX = (i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32);