mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 13:36:08 +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
43 lines
643 B
NASM
43 lines
643 B
NASM
; RUN: llvm-ml -filetype=s %s /Fo - | FileCheck %s
|
|
|
|
.code
|
|
|
|
t1:
|
|
jmp @F
|
|
jmp @F
|
|
; CHECK-LABEL: t1:
|
|
; CHECK-NEXT: jmp [[TEMP1:[[:alpha:][:digit:]]+]]
|
|
; CHECK-NEXT: jmp [[TEMP1]]
|
|
|
|
@@:
|
|
xor eax, eax
|
|
; CHECK: [[TEMP1]]:
|
|
; CHECK-NEXT: xor eax, eax
|
|
|
|
t2:
|
|
jmp @B
|
|
jmp @B
|
|
; CHECK-LABEL: t2:
|
|
; CHECK-NEXT: jmp [[TEMP1]]
|
|
; CHECK-NEXT: jmp [[TEMP1]]
|
|
|
|
t3:
|
|
jmp @F
|
|
; CHECK-LABEL: t3:
|
|
; CHECK-NEXT: jmp [[TEMP2:[[:alpha:][:digit:]]+]]
|
|
|
|
@@:
|
|
xor eax, eax
|
|
; CHECK: [[TEMP2]]:
|
|
; CHECK-NEXT: xor eax, eax
|
|
|
|
@@:
|
|
xor eax, eax
|
|
; CHECK: [[TEMP3:[[:alpha:][:digit:]]+]]:
|
|
; CHECK-NEXT: xor eax, eax
|
|
|
|
t4:
|
|
jmp @B
|
|
; CHECK-LABEL: t4:
|
|
; CHECK-NEXT: jmp [[TEMP3]]
|