public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "alines #7777" <alines7777@disroot.org>
Cc: gcc-help@gcc.gnu.org
Subject: Re: GCC __asm__( … )
Date: Thu, 11 Apr 2024 18:35:55 +0100	[thread overview]
Message-ID: <CAH6eHdS3sEamCY9DDotKHNXr4OPa+Huv1Uu8J3Uk0EYd+-n-eg@mail.gmail.com> (raw)
In-Reply-To: <7d611f71-9d92-409c-afb3-0711c6ecf6f6@Canary>

On Thu, 11 Apr 2024 at 18:22, alines #7777 via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Hello, I was wondering where I could find the source code for the inline assembly feature of the GCC compiler,

There isn't just one bit of code for it. Search for RID_ASM for where
it's handled by the parser, then you might be able to follow where it
goes next.


> I’ve been having trouble with an assembly instruction for “bswapl” on a i386 computer with GCC version 2.95.
> The bswap instruction works fine with it, however bswapl doesn’t let my code compile, whether I use a long long int for its input as i assume or a 32-bit integer. The compiler says that I’m using invalid operands with the instruction, rather than that the instruction doesn’t exist, and I’m hoping to understand what kind of operands would be valid.

Are you sure it's the compiler giving that error, and not the
assembler, which is not part of GCC at all?

      reply	other threads:[~2024-04-11 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 17:21 alines #7777
2024-04-11 17:35 ` Jonathan Wakely [this message]

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=CAH6eHdS3sEamCY9DDotKHNXr4OPa+Huv1Uu8J3Uk0EYd+-n-eg@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=alines7777@disroot.org \
    --cc=gcc-help@gcc.gnu.org \
    /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).