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

[inlineasm] integer mem input uses int operand as address instead of value #1728

Closed
llvmbot opened this issue Apr 25, 2007 · 6 comments
Closed
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:codegen miscompilation

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 25, 2007

Bugzilla Link 1356
Resolution FIXED
Resolved on Mar 06, 2010 13:59
Version 1.0
OS MacOS X
Attachments Simple test case
Reporter LLVM Bugzilla Contributor

Extended Description

llvm-gcc generates invalid code for a function consisting only of a single inline asm statement

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 25, 2007

assigned to @lattner

@lattner
Copy link
Collaborator

lattner commented Apr 27, 2007

Taking a look, we probably don't handle the 'o' constraint.

@lattner
Copy link
Collaborator

lattner commented Apr 27, 2007

hrm, this is nasty. The code generator is seeing o as a memory constraint (correct) then seeing the integer
constant as a valid offsetable address (wrong). Tracking.

@lattner
Copy link
Collaborator

lattner commented Apr 27, 2007

I am working on fixing this, but it may take several days. The workaround is to remove 'o' from the inline
asm.

@lattner
Copy link
Collaborator

lattner commented Apr 28, 2007

Fixed. Many patches made this possible, but the final patch is here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048601.html

Testcase here: CodeGen/X86/2007-04-27-InlineAsm-IntMemInput.ll

Many thanks for the reduced testcase!

-Chris

@llvmbot
Copy link
Collaborator Author

llvmbot commented Apr 28, 2007

Awesome, it will probably be a wee while before i can verify alas :(

@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
bugzilla Issues migrated from bugzilla llvm:codegen miscompilation
Projects
None yet
Development

No branches or pull requests

2 participants