Skip to content

add support for Visual Studio style inline assembler #2714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions regression/goto-instrument/assembly_call_graph_test/main.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
// This is a hack to make the test pass on windows. The way CBMC on
// windows handles assembly code needs to be fixed.
// CBMC doesn't recognise __asm mfence as a function.

#ifndef __GNUC__
void __asm_mfence();
#endif

void* thr(void * arg) {
#ifdef __GNUC__
__asm__ __volatile__ ("mfence": : :"memory");
// gcc/clang syntax
__asm__ __volatile__("mfence" : : : "memory");
#else
__asm_mfence();
// this is Visual Studio syntax
__asm mfence;
#endif
}

Expand Down
Loading