This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATH] AMD MWAITX enablement
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Pawar\, Amit" <Amit dot Pawar at amd dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, "binutils\ at sourceware dot org" <binutils at sourceware dot org>, Jan Beulich <JBeulich at suse dot com>
- Date: Fri, 26 Jun 2015 20:02:33 +0200
- Subject: Re: [PATH] AMD MWAITX enablement
- Authentication-results: sourceware.org; auth=none
- References: <0428E25D138CAA4D819A6FED9429E51AF4A29C at SCYBEXDAG02 dot amd dot com> <556D83DE02000078000800CE at mail dot emea dot novell dot com> <0428E25D138CAA4D819A6FED9429E51AF4A96C at SCYBEXDAG02 dot amd dot com> <55755AD50200007800081CE1 at mail dot emea dot novell dot com> <0428E25D138CAA4D819A6FED9429E51AF4CB28 at SCYBEXDAG02 dot amd dot com> <CAMe9rOocBnj6cEvcPLOg1cqm69bQgv1hC+9z-PP28TW3YCJRVA at mail dot gmail dot com> <0428E25D138CAA4D819A6FED9429E51AF4CBC5 at SCYBEXDAG02 dot amd dot com> <CAMe9rOpA=cZLNeAE0-kag8oU8hOJLubArHFZFEbmFnT7VeYrzQ at mail dot gmail dot com> <0428E25D138CAA4D819A6FED9429E51AF4CC18 at SCYBEXDAG02 dot amd dot com> <CAMe9rOogt0E+KrGwHcFWeyeTO-urVbT3K-NsOQaPDtZtU6heQg at mail dot gmail dot com> <0428E25D138CAA4D819A6FED9429E51AF4CC42 at SCYBEXDAG02 dot amd dot com> <CAMe9rOp0ELpkHcapKMEid7Egr0+N70L9TscitPXNg0od3OffJw at mail dot gmail dot com> <CAMe9rOq-Wz_bEEznq_Fq--LCpQ89PRqU8y78mRhnW6NnH_ob=w at mail dot gmail dot com> <0428E25D138CAA4D819A6FED9429E51AF4CCA0 at SCYBEXDAG02 dot amd dot com> <CAMe9rOrTkha5syNS6npijtvSpuTKke7fe+=P0gPJfjmqfUUuoQ at mail dot gmail dot com> <0428E25D138CAA4D819A6FED9429E51AF4CCB8 at SCYBEXDAG02 dot amd dot com>
"Pawar, Amit" <Amit.Pawar@amd.com> writes:
> @@ -3347,6 +3349,34 @@ process_immext (void)
> i.operands = 0;
> }
>
> + if (i.tm.cpu_flags.bitfield.cpumwaitx && i.operands > 0)
> + {
> + /* MONITORX/MWAITX instructions have fixed operands with an opcode
> + suffix which is coded in the same place as an 8-bit immediate field
> + would be.
> + Here we check those operands and remove them afterwards. */
> + unsigned int x;
> +
> + if (i.operands != 3)
> + abort();
> +
> + for (x = 0; x < 2; x++)
> + if (register_number (i.op[x].regs) != x)
> + goto bad_register_operand;
> +
> + /* Check for third operand for mwaitx/monitorx insn*/
> + if (register_number (i.op[x].regs) !=
> + (x + (i.tm.extension_opcode == 0xfb)))
Line break before operator, not after.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."