[PATCH] D58821: Inline asm constraints: allow ICE-like pointers for the "n" constraint (PR40890)
Joerg Sonnenberger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 5 05:50:03 PST 2019
joerg added a comment.
Well, that was a sample to illustrate the point. A full working (and now failing) example is:
static inline void outl(unsigned port, unsigned data) {
if (__builtin_constant_p(port) && port < 0x100) {
__asm volatile("outl %0,%w1" : : "a"(data), "n"(port));
} else {
__asm volatile("outl %0,%w1" : : "a"(data), "d"(port));
}
}
void f(unsigned port) { outl(1, 1); }
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58821/new/
https://reviews.llvm.org/D58821
More information about the cfe-commits
mailing list