3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 02:15:19 +00:00

add support to build with MSVC /Gr (fastcall mode for x86)

not enabled by default nor exposed at the moment
This commit is contained in:
Nuno Lopes 2016-03-24 15:39:18 +00:00
parent 89fad8913f
commit 83e34638e6
8 changed files with 15 additions and 8 deletions

View file

@ -109,7 +109,7 @@ static void on_timeout() {
exit(0);
}
static void on_ctrl_c(int) {
static void STD_CALL on_ctrl_c(int) {
signal (SIGINT, SIG_DFL);
display_statistics();
raise(SIGINT);

View file

@ -47,7 +47,7 @@ static void on_timeout() {
exit(0);
}
static void on_ctrl_c(int) {
static void STD_CALL on_ctrl_c(int) {
signal (SIGINT, SIG_DFL);
display_statistics();
raise(SIGINT);

View file

@ -291,7 +291,7 @@ char const * get_extension(char const * file_name) {
}
}
int main(int argc, char ** argv) {
int STD_CALL main(int argc, char ** argv) {
try{
unsigned return_value = 0;
memory::initialize(0);

View file

@ -305,7 +305,7 @@ static void display_statistics() {
display_results();
}
static void on_ctrl_c(int) {
static void STD_CALL on_ctrl_c(int) {
if (g_opt && g_first_interrupt) {
g_opt->get_manager().limit().cancel();
g_first_interrupt = false;

View file

@ -62,7 +62,7 @@ static void on_timeout() {
}
}
static void on_ctrl_c(int) {
static void STD_CALL on_ctrl_c(int) {
signal (SIGINT, SIG_DFL);
#pragma omp critical (g_display_stats)
{

View file

@ -20,16 +20,17 @@ Revision History:
#define SCOPED_CTRL_C_H_
#include"event_handler.h"
#include"util.h"
struct scoped_ctrl_c {
event_handler & m_cancel_eh;
bool m_first;
bool m_once;
bool m_enabled;
void (*m_old_handler)(int);
void (STD_CALL *m_old_handler)(int);
scoped_ctrl_c * m_old_scoped_ctrl_c;
static scoped_ctrl_c * g_obj;
static void on_ctrl_c(int);
static void STD_CALL on_ctrl_c(int);
public:
// If once == true, then the cancel_eh is invoked only at the first Ctrl-C.
// The next time, the old signal handler will take over.

View file

@ -69,6 +69,12 @@ COMPILE_TIME_ASSERT(sizeof(int64) == 8);
#define THREAD_LOCAL
#endif
#ifdef _MSC_VER
# define STD_CALL __cdecl
#else
# define STD_CALL
#endif
#ifdef __fallthrough
# define Z3_fallthrough __fallthrough
#elif defined(__has_cpp_attribute)

View file

@ -28,7 +28,7 @@ Revision History:
#define PRF sprintf_s
#define VPRF vsprintf_s
void myInvalidParameterHandler(
void STD_CALL myInvalidParameterHandler(
const wchar_t* expression,
const wchar_t* function,
const wchar_t* file,