`llvm-ml-19` disagrees with `ml` on the order of visibility attributes
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
`llvm-ml-19` diverges from Microsoft Macro Assembler (`ml64.exe`) regarding the ordering of visibility attributes (`PUBLIC` / `PRIVATE`) and frame specifications (`FRAME`) on procedure definitions (`PROC`).
- `ml64.exe` requires visibility modifiers `PUBLIC` **before** `FRAME`, as in `PROC PUBLIC FRAME`, but rejects `PROC FRAME PUBLIC`.
- `llvm-ml` requires `FRAME` **before** visibility modifiers, as in `PROC FRAME PUBLIC`.
### **Steps to Reproduce**
Assemble these assemblies with `llvm-ml-19` and `ml64.exe` respectively and they do not agree with each other.
```asm
; Accepted by Microsoft (R) Macro Assembler (x64) Version 14.50.35729.0
.code
myfunc PROC PUBLIC FRAME
sub rsp, 8
.allocstack 8
.endprolog
ret
myfunc ENDP
END
```
**vs**
```asm
; Accepted by llvm-ml
.code
myfunc PROC FRAME PUBLIC
sub rsp, 8
.allocstack 8
.endprolog
ret
myfunc ENDP
END
```
Contributor guide
Research direction
Start by reproducing the two PROC forms shown with llvm-ml-19 and ml64.exe, focusing on the ordering of PUBLIC/PRIVATE and FRAME. Read the llvm-ml-19 assembler handling for procedure definitions, then add or update coverage so the syntax accepted by Microsoft Macro Assembler is also accepted and the incompatible ordering is handled consistently.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100