Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPC inline asm: "I" modifier character not supportetd #1723

Closed
isanbard opened this issue Apr 24, 2007 · 9 comments
Closed

PPC inline asm: "I" modifier character not supportetd #1723

isanbard opened this issue Apr 24, 2007 · 9 comments
Assignees
Labels
backend:PowerPC bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@isanbard
Copy link
Contributor

Bugzilla Link 1351
Resolution FIXED
Resolved on Feb 22, 2010 12:48
Version trunk
OS MacOS X
Blocks #1234
CC @asl

Extended Description

This program:

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

cond_next408: ; preds = %entry
%tmp553 = icmp sgt i32 0, -1 ; [#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 ) ; [#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, 9, %r2, 9, %r2, 9, %
r2, 9, %r2
INLINEASM <es:$(a${5:I}$|add${5:I}c$) $1,$4,$5
$(ae$|adde$) $0,$2,$3> 10 %mreg(57) 10 %mreg(68) 9 %mreg(57) 9
%mreg(57) 9 %mreg(57) 9 %mreg(57)

@isanbard
Copy link
Contributor Author

assigned to @lattner

@isanbard
Copy link
Contributor Author

This was found compiling GMP-4.2.1.

@asl
Copy link
Collaborator

asl commented Apr 24, 2007

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?

@isanbard
Copy link
Contributor Author

Yeah. GMP has been the source of some of the inline ASM improvements in the past. :-)

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

-bw

@asl
Copy link
Collaborator

asl commented Apr 24, 2007

I think it's worth to try "fat" build, since it will sum all possible
implementations for specific platform.

@lattner
Copy link
Collaborator

lattner commented Apr 25, 2007

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

@lattner
Copy link
Collaborator

lattner commented Apr 25, 2007

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

@isanbard
Copy link
Contributor Author

I will...sorry about not putting the source up there. I didn't have "delta" with me at the time...

:-)

-bw

@asl
Copy link
Collaborator

asl commented Nov 27, 2021

mentioned in issue #1234

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:PowerPC bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead
Projects
None yet
Development

No branches or pull requests

3 participants