LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1351 - PPC inline asm: "I" modifier character not supportetd
Summary: PPC inline asm: "I" modifier character not supportetd
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: PowerPC (show other bugs)
Version: trunk
Hardware: Macintosh MacOS X
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks: 862
  Show dependency tree
 
Reported: 2007-04-24 02:59 PDT by Bill Wendling
Modified: 2010-02-22 12:48 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Wendling 2007-04-24 02:59:42 PDT
This program:

define void @__gmpn_divrem_1(i32 %d) {
entry:
        %tmp14 = icmp slt i32 %d, 0             ; <i1> [#uses=1]
        br i1 %tmp14, label %cond_next408, label %cond_false701

cond_next408:           ; preds = %entry
        %tmp553 = icmp sgt i32 0, -1            ; <i1> [#uses=1]
        br i1 %tmp553, label %bb419, label %bb692

bb419:          ; preds = %cond_next408
        %tmp531 = call i32 asm "$(a${5:I}$|add${5:I}c$) $1,$4,$5\0A\09$(ae$|adde$) $0,$2,$3", 
"=r,==r,r,r,r,rI"( i32
* null, i32 0, i32 0, i32 0, i32 0 )            ; <i32> [#uses=0]
        unreachable

bb692:          ; preds = %cond_next408
        ret void

cond_false701:          ; preds = %entry
        ret void
}

Results in this error:

Invalid operand found in inline asm: '$(a${5:I}$|add${5:I}c$) $1,$4,$5
        $(ae$|adde$) $0,$2,$3'
  INLINEASM <es:$(a${5:I}$|add${5:I}c$) $1,$4,$5
        $(ae$|adde$) $0,$2,$3>, 10, %r2<def,dead>, 10, %r3<def>, 9, %r2<kill>, 9, %r2<kill>, 9, %
r2<kill>, 9, %r2<kill>
INLINEASM       <es:$(a${5:I}$|add${5:I}c$) $1,$4,$5
        $(ae$|adde$) $0,$2,$3>  10      %mreg(57)<d>    10      %mreg(68)<d>    9       %mreg(57)       9       
%mreg(57)   9       %mreg(57)       9       %mreg(57)
Comment 1 Bill Wendling 2007-04-24 03:00:33 PDT
This was found compiling GMP-4.2.1.
Comment 2 Anton Korobeynikov 2007-04-24 05:44:00 PDT
GMP contains much inline assembly. It's worth to use it as good test for inline
assembler support.

Bill, you compiled GMP in "normal" or "fat" mode?
Comment 3 Bill Wendling 2007-04-24 13:47:45 PDT
Yeah. GMP has been the source of some of the inline ASM improvements in the past. :-)

Normal; just doing a "./configure && make" command.

-bw
Comment 4 Anton Korobeynikov 2007-04-24 13:51:14 PDT
I think it's worth to try "fat" build, since it will sum all possible
implementations for specific platform.
Comment 5 Chris Lattner 2007-04-24 17:34:04 PDT
Hey Bill,

In the future, can you please paste the C inline asm from the source when you file a bug?  It makes it 
easier for me to verify that llvm matches GCC's behavior, thanks,

-Chris
Comment 6 Chris Lattner 2007-04-24 17:51:47 PDT
Fixed, patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048368.html

Testcase here: CodeGen/PowerPC/2007-04-24-InlineAsm-I-Modifier.ll

-Chris
Comment 7 Bill Wendling 2007-04-24 18:06:46 PDT
I will...sorry about not putting the source up there. I didn't have "delta" with me at the time...

:-)

-bw