From: Ben Collins <bcollins@debian.org>
To: vda <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Asm style
Date: Wed, 21 Nov 2001 16:21:28 -0500 [thread overview]
Message-ID: <20011121162128.E363@visi.net> (raw)
In-Reply-To: <01112123070300.05447@manta>
In-Reply-To: <01112123070300.05447@manta>
On Wed, Nov 21, 2001 at 11:07:03PM +0000, vda wrote:
> I'm using GCC 3.0.1 and seeing "multi-line literals are deprecated".
> Since a patch is necessary for that (and someone submitted it already)
> I'd like to hear from big kernel guys what asm statement style to use:
> asm(
> " cmd r,r\n"
> "lbl: cmd r,r\n"
> " cmd r,r\n"
> : spec
> : spec
> );
> [variable width for labels? I don't like it] or
> asm(
> " cmd r,r\n"
> "lbl: cmd r,r\n"
> " cmd r,r\n"
> : spec
> : spec
> );
> [better. But \n's are ugly] or
> #define NL "\n"
> asm(
> " cmd r,r" NL
> "lbl: cmd r,r" NL
> " cmd r,r" NL
> : spec
> : spec
> );
There's also:
asm("\
cmd r,r\n\
lbl: cmd r,r\n\
cmd r,r\n" : spec : spec);
Or something similar (the trailing "\" added for continuation). Probably
the easiest way to patch existing asm.
--
.----------=======-=-======-=========-----------=====------------=-=-----.
/ Ben Collins -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
next prev parent reply other threads:[~2001-11-21 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-21 23:07 Asm style vda
2001-11-21 21:21 ` Ben Collins [this message]
[not found] <fa.derh1nv.1h0ai0b@ifi.uio.no>
[not found] ` <fa.njuqm5v.100c5ak@ifi.uio.no>
2001-11-22 14:29 ` Giacomo Catenazzi
2001-11-22 11:31 ` Jakub Jelinek
[not found] <fa.d6k3juv.16q3on@ifi.uio.no>
[not found] ` <fa.cbkkrrv.m72ejr@ifi.uio.no>
2001-11-22 12:43 ` Giacomo Catenazzi
2001-11-22 9:27 ` ncw
[not found] <01112123070300.05447@manta.suse.lists.linux.kernel>
2001-11-21 21:23 ` Andi Kleen
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=20011121162128.E363@visi.net \
--to=bcollins@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vda@port.imtp.ilyichevsk.odessa.ua \
/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