public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: unlvsur unlvsur <unlvsur@live.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: RE: How to detect user uses -masm=intel?
Date: Thu, 29 Jul 2021 02:48:31 +0000	[thread overview]
Message-ID: <DM6PR05MB4697EF30A9E37E8A30C4BD92D6EB9@DM6PR05MB4697.namprd05.prod.outlook.com> (raw)
In-Reply-To: <CA+=Sn1=ubdD20xr5FQcBgu+mLx7x5y6UgfWmmPKKDrRK=mSKHA@mail.gmail.com>

What I mean is that what macro GCC sets when it compiles -masm=intel


Int main()
{
#ifdef /*__INTEL_ASM????*/
                printf(“intel”);
#else
                printf(“at&t”);
#endif
}

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Andrew Pinski<mailto:pinskia@gmail.com>
Sent: Wednesday, July 28, 2021 21:43
To: unlvsur unlvsur<mailto:unlvsur@live.com>
Cc: gcc@gcc.gnu.org<mailto:gcc@gcc.gnu.org>
Subject: Re: How to detect user uses -masm=intel?

On Wed, Jul 28, 2021 at 6:41 PM unlvsur unlvsur via Gcc <gcc@gcc.gnu.org> wrote:
>
> Any GCC macro that can tell the code it is using the intel format’s assembly instead of at&t??

Inside the inline-asm you can use the alternative.
Like this:
cmp{b}\t{%1, %h0|%h0, %1}

This is how GCC implements this inside too.

Thanks,
Andrew

>
> Sent from Mail<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&amp;data=04%7C01%7C%7C9ff9312911b84c6126dc08d952323529%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637631197911449533%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ygQvHY1b7whxaAMvhglHY12E688oc%2F%2BqBe7AKwVQfBs%3D&amp;reserved=0> for Windows 10
>


  parent reply	other threads:[~2021-07-29  2:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  1:39 unlvsur unlvsur
2021-07-29  1:42 ` Andrew Pinski
2021-07-29  2:04   ` unlvsur unlvsur
2021-07-29  2:48   ` unlvsur unlvsur [this message]
2021-07-29  7:04     ` Hongtao Liu
2021-07-29  8:38     ` Florian Weimer
2021-07-30  0:32       ` unlvsur unlvsur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR05MB4697EF30A9E37E8A30C4BD92D6EB9@DM6PR05MB4697.namprd05.prod.outlook.com \
    --to=unlvsur@live.com \
    --cc=gcc@gcc.gnu.org \
    --cc=pinskia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).