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

[x86] dollar-signs in identifiers in assembly not protected #1711

Closed
sunfishcode opened this issue Apr 17, 2007 · 3 comments
Closed

[x86] dollar-signs in identifiers in assembly not protected #1711

sunfishcode opened this issue Apr 17, 2007 · 3 comments
Assignees
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@sunfishcode
Copy link
Member

Bugzilla Link 1339
Resolution FIXED
Resolved on Feb 22, 2010 12:52
Version trunk
OS Linux
Attachments a possible fix

Extended Description

In this testcase:

declare void @"$foo"()

define void @​bar() {
call void @"$foo"()
ret void
}

For x86, llvm emits the following:
call $foo
With GAS, this gets an error:

test.s:9: Error: suffix or operands invalid for `call'

This can be fixed by enclosing the name in parentheses, like this:
call ($foo)

@sunfishcode
Copy link
Member Author

assigned to @sunfishcode

@lattner
Copy link
Collaborator

lattner commented Apr 17, 2007

Interesting bug. Your patch looks like the right first step. Please do take the next one, to make it not
print parens when not needed. This should only occur for the GlobalValue case, in which case a strchr of
the name should work, or is there some other bad case?

-Chris

@sunfishcode
Copy link
Member Author

Fixed. Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070423/048526.html

Testcase here: test/CodeGen/X86/dollar-name.ll

@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:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead
Projects
None yet
Development

No branches or pull requests

2 participants