Skip to content

[mc] no support for .macro with arguments #9620

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

Closed
nlewycky opened this issue Feb 19, 2011 · 4 comments
Closed

[mc] no support for .macro with arguments #9620

nlewycky opened this issue Feb 19, 2011 · 4 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@nlewycky
Copy link
Contributor

Bugzilla Link 9248
Resolution FIXED
Resolved on Apr 17, 2016 13:30
Version unspecified
OS Linux
Blocks #4440 llvm/llvm-bugzilla-archive#18918
CC @compnerd,@edwintorok,@kjwinchester

Extended Description

llvm-mc rejects this file:

.macro macroname argone argtwo
.endm

with:

$ llvm-mc -assemble -filetype=obj y.s
y.s:1:19: error: unexpected token in '.macro' directive
.macro macroname argone argtwo
^
y.s:2:7: error: unexpected '.endm' in file, no current macro definition
.endm
^

while as is fine with it. The unknown tokens are arguments to the macro, documented in GAS here: http://sourceware.org/binutils/docs-2.21/as/Macro.html

This is blocking arch/x86/include/asm/inst.h in the linux kernel.

@edwintorok
Copy link
Contributor

Needs:

  • new token for \ in asmlexer
  • parse macro argument names
  • handle arguments with default values
  • handle non-blank arguments (:req)
  • support () in macro body

GAS also supports :vararg, and .altmacro but that doesn't seem to be required for the kernel.

@llvmbot
Copy link
Member

llvmbot commented Jun 5, 2011

I am implementing this (maybe just a subset).

@llvmbot
Copy link
Member

llvmbot commented Jun 5, 2011

I implemented the basics in 132656, but don't intend to implement the rest right now.

@compnerd
Copy link
Member

Im going to close this off as the list that is mentioned is pretty out of date. The only feature from that list which is currently unsupported is the alternate mode assembly input.

@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
Projects
None yet
Development

No branches or pull requests

4 participants