SMLoc TypeLoc = getTok().getLoc();
if (parseIdentifier(TypeName))
return Error(TypeLoc, "expected type");
- AsmTypeInfo Type;
- if (lookUpType(TypeName, Type))
- return Error(TypeLoc, "unrecognized type");
- KnownType[Name.lower()] = Type;
+ if (!TypeName.equals_insensitive("proc")) {
+ AsmTypeInfo Type;
+ if (lookUpType(TypeName, Type))
+ return Error(TypeLoc, "unrecognized type");
+ KnownType[Name.lower()] = Type;
+ }
MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
Sym->setExternal(true);
; RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s --check-prefixes=CHECK,CHECK-32
; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s --check-prefixes=CHECK,CHECK-64
-extern foo : dword, bar : word
+extern foo : dword, bar : word, baz : proc
; CHECK: .extern foo
; CHECK: .extern bar
+; CHECK: .extern baz
.code
mov ebx, foo
else
extern fn_ref_extern : dword
endif
+
+extern fn_proc_extern : proc
extern fn_ref_extern_word : word
.data
; CHECK-32: call word ptr [fn_ref_extern_word]
; CHECK-32-NEXT: jmp word ptr [fn_ref_extern_word]
endif
+
+t23:
+call fn_proc_extern
+jmp fn_proc_extern
+; CHECK-LABEL: t23:
+; CHECK: call fn_proc_extern
+
+t24:
+call [fn_proc_extern]
+jmp [fn_proc_extern]
+; CHECK-LABEL: t24:
+; CHECK: call fn_proc_extern
+
+t25:
+; CHECK-LABEL: t25:
+ifdef rax
+ call qword ptr [fn_ref_extern]
+ jmp qword ptr [fn_ref_extern]
+ ; CHECK-64: call qword ptr [rip + fn_ref_extern]
+ ; CHECK-64: jmp qword ptr [rip + fn_ref_extern]
+else
+ call dword ptr [fn_ref_extern]
+ jmp dword ptr [fn_ref_extern]
+ ; CHECK-32: call dword ptr [fn_ref_extern]
+ ; CHECK-32: jmp dword ptr [fn_ref_extern]
+endif
+
+end