MINGW As the complier and GDB as the debugger in Visual Studio
-
Hi just wondering if anyone has changed from MSVC to Mingw. I recently wanted to write my own prologue and epilogue code. for (I am using C++ with MFC) and I noticed the mingw supports X64 inline assembler. There are no intrinsics to access registers in MSVC which would make if difficult Thanks
-
Hi just wondering if anyone has changed from MSVC to Mingw. I recently wanted to write my own prologue and epilogue code. for (I am using C++ with MFC) and I noticed the mingw supports X64 inline assembler. There are no intrinsics to access registers in MSVC which would make if difficult Thanks
-
ForNow wrote:
I noticed the mingw supports X64 inline assembler
So does MSVC. See __asm | Microsoft Docs[^]
not supported for X64
Quote:
error C4235: nonstandard extension used: '__asm' keyword not supported on this architecture 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(135): error C2065: 'mov': undeclared identifier 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(135): error C2146: syntax error: missing ';' before identifier 'RAX' 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(135): error C2065: 'RAX': undeclared identifier 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(136): error C2143: syntax error: missing ';' before '}' 1>CControlRegs.cpp
-
not supported for X64
Quote:
error C4235: nonstandard extension used: '__asm' keyword not supported on this architecture 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(135): error C2065: 'mov': undeclared identifier 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(135): error C2146: syntax error: missing ';' before identifier 'RAX' 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(135): error C2065: 'RAX': undeclared identifier 1>c:\dbgr\dbgr\dbgr\casidlist.cpp(136): error C2143: syntax error: missing ';' before '}' 1>CControlRegs.cpp
-
There are ways round most problems, see MASM for x64 (ml64.exe) | Microsoft Docs[^].
-
Just wondering why they removed that option if you want to write your own prolog and epilogue it is helpful more so there are no intrinsics to access the registers in C\C++ Thanks
-
That is sort of why we have high level languages with their compilers. You shouldn't have to know. I am really curious to why the standard one is unsuitable, in this case. (Don't take this as any critical voice, or any sort of "objection" - it is meant as positive, curious question!)
-
That is sort of why we have high level languages with their compilers. You shouldn't have to know. I am really curious to why the standard one is unsuitable, in this case. (Don't take this as any critical voice, or any sort of "objection" - it is meant as positive, curious question!)