[LLVMbugs] [Bug 11657] New: error in backend: Invalid operand for inline asm constraint 'i'! error in backend: Invalid operand for inline asm constraint 'i'!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 27 05:41:44 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11657
Bug #: 11657
Summary: error in backend: Invalid operand for inline asm
constraint 'i'! error in backend: Invalid operand for
inline asm constraint 'i'!
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ismail at namtrac.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7807
--> http://llvm.org/bugs/attachment.cgi?id=7807
Reduced testcase
Sample testcase;
> cat testcase.i
typedef int int32_t;
typedef long int intptr_t;
struct sbc_encoder_state {
void (*sbc_calc_scalefactors)(int32_t sb_sample_f[16][2][8],
int blocks, int channels, int subbands);
};
static void sbc_calc_scalefactors_mmx(
int32_t sb_sample_f[16][2][8],
int blocks, int channels, int subbands)
{
int ch, sb;
intptr_t blk;
for (ch = 0; ch < channels; ch++) {
for (sb = 0; sb < subbands; sb += 2) {
__asm__ volatile (
"movq (%4), %%mm0\n"
: "+r" (blk)
: "r" (&sb_sample_f[0][ch][sb]),
"i" ((char *) &sb_sample_f[1][0][0] -
(char *) &sb_sample_f[0][0][0]),
"i" (15)
: "cc", "memory");
}
}
}
void sbc_init_primitives_mmx(struct sbc_encoder_state *state)
{
state->sbc_calc_scalefactors = sbc_calc_scalefactors_mmx;
}
> clang -c testcase.i
fatal error: error in backend: Invalid operand for inline asm constraint 'i'!
> clang -v
clang version 3.1 (trunk 147142)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list