This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] [X86_64]: Add support for MONITORX and MWAITX ISA
- From: "Kumar, Venkataramanan" <Venkataramanan dot Kumar at amd dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Jun 2015 10:27:26 +0000
- Subject: RE: [PATCH] [X86_64]: Add support for MONITORX and MWAITX ISA
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;
- References: <7794A52CE4D579448B959EED7DD0A4723DD0E410 at satlexdag06 dot amd dot com> <CAFULd4a6yUrC+0UsjRa_GsxCd254hApGqS+ZkCy7vvJhcBbpLQ at mail dot gmail dot com>
Hi Uros,
> -----Original Message-----
> From: Uros Bizjak [mailto:ubizjak@gmail.com]
> Sent: Thursday, June 11, 2015 3:50 PM
> To: Kumar, Venkataramanan
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] [X86_64]: Add support for MONITORX and MWAITX ISA
>
> On Thu, Jun 11, 2015 at 11:49 AM, Kumar, Venkataramanan
> <Venkataramanan.Kumar@amd.com> wrote:
> > Hi Maintainers,
> >
> > Ok for trunk ?
>
> OK for mainline with a small improvement below.
>
> + case IX86_BUILTIN_MONITORX:
> + arg0 = CALL_EXPR_ARG (exp, 0);
> + arg1 = CALL_EXPR_ARG (exp, 1);
> + arg2 = CALL_EXPR_ARG (exp, 2);
> + op0 = expand_normal (arg0);
> + op1 = expand_normal (arg1);
> + op2 = expand_normal (arg2);
> + if (!REG_P (op0))
> + op0 = ix86_zero_extend_to_Pmode (op0);
> + if (!REG_P (op1))
> + op1 = copy_to_mode_reg (SImode, op1);
> + if (!REG_P (op2))
> + op2 = copy_to_mode_reg (SImode, op2);
> + emit_insn (ix86_gen_monitorx (op0, op1, op2));
> + return 0;
>
> Please merge the above with existing IX86_BUILTIN_MONITOR. You can use
> emit_insn (fcode == IX86_BUILTIN_MONITOR
> ? ix86_gen_monitor (...)
> : ix86_gen_monitorx (...));
>
> Thanks,
> Uros.
Thank you. I committed the patch along with your suggestion.
Ref: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=224414
We would like to get this ISA support into next release compiler based on GCC 5.
Is this ok for gcc-5-branch?
Regards,
Venkat.