From: David Laight <David.Laight@ACULAB.COM>
To: 'Suzuki K Poulose' <suzuki.poulose@arm.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Arnd Bergmann <arnd@kernel.org>,
Tao Zhang <quic_taozha@quicinc.com>,
"Mike Leach" <mike.leach@linaro.org>,
Leo Yan <leo.yan@linaro.org>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
Nathan Chancellor <nathan@kernel.org>, Tom Rix <trix@redhat.com>,
"coresight@lists.linaro.org" <coresight@lists.linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>
Subject: RE: [PATCH v5] coresight: etm4x: avoid build failure with unrolled loops
Date: Tue, 28 Jun 2022 09:40:40 +0000 [thread overview]
Message-ID: <bd4a9bad394b478f9ee0d9c0981948f8@AcuMS.aculab.com> (raw)
In-Reply-To: <6b330119-fbf2-1c34-7ad3-0ae789658d22@arm.com>
...
> > Regardless of which compiler or compiler options determine whether a
> > loop can or can't be unrolled, which determines whether
> > __builtin_constant_p evaluates to true when passed an expression using a
> > loop induction variable, it is NEVER safe to allow the preprocessor to
> > construct inline asm like:
> > asm volatile (".inst (0x160 + (i * 4))" : "=r"(__val));
> > ^ expected constant expression
Can't you use (IIRC) an "=i" constraint with the C expression
so that the compiler evaluates the expression and passes the
correct constant value to the assembler?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-06-28 9:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 22:02 [PATCH v4] " Nick Desaulniers
2022-06-23 9:46 ` Suzuki K Poulose
2022-06-23 17:41 ` [PATCH v5] " Nick Desaulniers
2022-06-27 21:44 ` Suzuki K Poulose
2022-06-28 9:40 ` David Laight [this message]
2022-07-08 23:04 ` Nick Desaulniers
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=bd4a9bad394b478f9ee0d9c0981948f8@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnd@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=quic_taozha@quicinc.com \
--cc=suzuki.poulose@arm.com \
--cc=trix@redhat.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
all inboxes | Powered by JetHome®