From: Doug Evans <dje@transmeta.com>
To: "Alex Holland" <alexh@stellarwinds.com>
Cc: <crossgcc@sourceware.cygnus.com>
Subject: M68k Inline Assmbly with C Style Operands
Date: Sat, 28 Oct 2000 12:17:00 -0000 [thread overview]
Message-ID: <14843.9749.232619.16025@casey.transmeta.com> (raw)
In-Reply-To: <00d701c04113$a7a36020$8464a8c0@stellarwinds.com>
Alex Holland writes:
> // Example 1: No C style operands works fine.
> asm("move 0x2700, %sr");
Without arguments, gcc passes the string through to the assembler
unchanged. This is a DIFFERENT kind of asm than an asm with colon
separated arguments. For example, such an asm is always marked as
"volatile" (IIRC!), and it can be used outside functions.
> // Example 2: The % in %sr made the compiler look for another operand.
> #define MY_MACRO 0x2700
>
> asm("move %0, %sr;"
> :
> : "i"(MY_MACRO)
> );
s/%sr/%%sr/
> // Example 3: Would not link because sr is undefined.
> asm("move %0, sr;"
> :
> : "i"(MY_MACRO)
> );
I'm guessing %%sr is what you want.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
prev parent reply other threads:[~2000-10-28 12:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-28 12:07 Alex Holland
2000-10-28 12:17 ` Doug Evans [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=14843.9749.232619.16025@casey.transmeta.com \
--to=dje@transmeta.com \
--cc=alexh@stellarwinds.com \
--cc=crossgcc@sourceware.cygnus.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).