Issue 132863
Summary clang-cl inline asm bug about lable offset
Labels new issue
Assignees
Reporter sonyps5201314
    ```cpp
int main()
{
	unsigned dwpXSP, dwpXBP, dwpXIP;
#if defined(_M_IX86)
	__asm
	{
	XIP_lable:
		mov dwpXIP, offset XIP_lable
		mov dwpXSP, esp
		mov dwpXBP, ebp
	}
#else
#error please build with x86
#endif
	return 0;
}
```
Compiling the above code with clang-cl for x86 will result in the following link error, 
`
1>lld-link : error : undefined symbol: __MSASMLABEL_.0__XIP_lable
1>>>> referenced by Z:\TestInlineAsmBug\TestInlineAsmBug\TestInlineAsmBug.cpp:5
1>>>> Debug\TestInlineAsmBug.obj:(_main)
`
but with MSVC there will be no error.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to