[LLVMbugs] [Bug 3379] New: Invalid operand found in inline asm: 'movl %gs:${1:P}, $0'

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 23 14:01:24 PST 2009


           Summary: Invalid operand found in inline asm: 'movl
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Another one from the kernel

typedef unsigned long long u64;
    extern __typeof__(int) per_cpu__cpu_number;
    static u64 __attribute__((__section__(".data.read_mostly")))
    void pat_init(void) {
    u64 pat;
    printk("<6>" "x86 PAT enabled: cpu %d, old 0x%Lx, new 0x%Lx\n",         (({
  typeof(per_cpu__cpu_number) ret__;
  switch (sizeof(per_cpu__cpu_number)) {
 case 4: asm("mov" "l ""%%""gs"":%P" "1"",%0" : "=r" (ret__) : "m"
  )), boot_pat_state, pat);

$ llvm-gcc testcase-min.i
Invalid operand found in inline asm: 'movl %gs:${1:P},$0'
  INLINEASM <es:movl %gs:${1:P},$0>, 10, %ECX<def>, 36, %reg0, 1, %reg0,

With %1 gcc generates this:
  movl %gs:per_cpu__cpu_number,%eax

Without %P gcc generates this:
  movl %gs:per_cpu__cpu_number(%rip),%eax

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