mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 05:26:06 +00:00

ml.exe and ml64.exe support the use of anonymous labels, with @B and @F referring to the previous and next anonymous label respectively. We add similar support to llvm-ml, with the exception that we are unable to emit an error message for an @F expression not followed by a @@ label. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D128944
17 lines
364 B
NASM
17 lines
364 B
NASM
; RUN: not llvm-ml -filetype=s %s /Fo - 2>&1 | FileCheck %s --implicit-check-not=error:
|
|
|
|
.code
|
|
|
|
; CHECK: :[[# @LINE + 2]]:5: error: Expected @@ label before @B reference
|
|
; CHECK: :[[# @LINE + 1]]:7: error: Unexpected identifier!
|
|
jmp @B
|
|
|
|
@@:
|
|
jmp @B
|
|
jmp @F
|
|
@@:
|
|
xor eax, eax
|
|
|
|
; NOTE: a trailing @F will not fail; fixing this seems to require two passes.
|
|
jmp @F
|