From 7016ae4e90e1f36b1e793a09692955e99662a4b3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 19 Nov 2017 18:21:34 +0100 Subject: [PATCH] orccpu-x86: Fix undefined behaviour compilation issue runtime error: left shift of 1 by 31 places cannot be represented in type 'int' --- orc/orccpu-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orc/orccpu-x86.c b/orc/orccpu-x86.c index f5620b0..03dbcb0 100644 --- a/orc/orccpu-x86.c +++ b/orc/orccpu-x86.c @@ -520,10 +520,10 @@ orc_sse_detect_cpuid_amd (orc_uint32 level) if (edx & (1<<22)) { orc_x86_mmx_flags |= ORC_TARGET_MMX_MMXEXT; } - if (edx & (1<<31)) { + if (edx & (1U<<31)) { orc_x86_mmx_flags |= ORC_TARGET_MMX_3DNOW; } - if (edx & (1<<30)) { + if (edx & (1U<<30)) { orc_x86_mmx_flags |= ORC_TARGET_MMX_3DNOWEXT; } } -- 2.7.4