From 251dc4504804922edb1d95f31b3fe0c1859e9d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Thu, 17 Dec 2020 01:24:39 +0100 Subject: [PATCH] codegen: replace asm block with an intrinsic --- src/codegen_new/codegen_backend_x86-64.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/codegen_new/codegen_backend_x86-64.c b/src/codegen_new/codegen_backend_x86-64.c index 7cdfcd1d3..b9919e899 100644 --- a/src/codegen_new/codegen_backend_x86-64.c +++ b/src/codegen_new/codegen_backend_x86-64.c @@ -22,6 +22,8 @@ #include #endif +#include + void *codegen_mem_load_byte; void *codegen_mem_load_word; void *codegen_mem_load_long; @@ -340,11 +342,7 @@ void codegen_backend_init() block_write_data = NULL; - asm( - "stmxcsr %0\n" - : "=m" (cpu_state.old_fp_control) - ); - cpu_state.trunc_fp_control = cpu_state.old_fp_control | 0x6000; + cpu_state.trunc_fp_control = _mm_getcsr() | 0x6000; } void codegen_set_rounding_mode(int mode)