--- /dev/null
+/** @file\r
+ 64-bit Math Worker Function.\r
+ The 32-bit versions of C compiler generate calls to library routines\r
+ to handle 64-bit math. These functions use non-standard calling conventions.\r
+\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License which accompanies this\r
+ distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+\r
+/*\r
+ * Shifts a 64-bit signed value right by a particular number of bits.\r
+ */\r
+__declspec(naked) void __cdecl _allshr (void)\r
+{\r
+ _asm {\r
+ ;\r
+ ; Handle shifts of 64 bits or more (if shifting 64 bits or more, the result\r
+ ; depends only on the high order bit of edx).\r
+ ;\r
+ cmp cl,64\r
+ jae short SIGNRETURN\r
+\r
+ ;\r
+ ; Handle shifts of between 0 and 31 bits\r
+ ;\r
+ cmp cl, 32\r
+ jae short MORE32\r
+ shrd eax,edx,cl\r
+ sar edx,cl\r
+ ret\r
+\r
+ ;\r
+ ; Handle shifts of between 32 and 63 bits\r
+ ;\r
+MORE32:\r
+ mov eax,edx\r
+ sar edx,31\r
+ and cl,31\r
+ sar eax,cl\r
+ ret\r
+\r
+ ;\r
+ ; Return double precision 0 or -1, depending on the sign of edx\r
+ ;\r
+SIGNRETURN:\r
+ sar edx,31\r
+ mov eax,edx\r
+ ret\r
+ }\r
+}\r
## @file\r
# Standard C library: Miscelaneous implementations.\r
#\r
-# Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# Compiler helper (C RunTime) functions\r
CRT/Ia32/llmul.c | MSFT # __allmul\r
CRT/Ia32/llshl.c | MSFT # __allshl\r
+ CRT/Ia32/llshr.c | MSFT # __allshr\r
CRT/Ia32/ulldiv.c | MSFT # __aulldiv\r
CRT/Ia32/ullrem.c | MSFT # __aullrem\r
CRT/Ia32/ullshr.c | MSFT # __aullshr\r
\r
CRT/Ia32/llmul.c | INTEL\r
CRT/Ia32/llshl.c | INTEL\r
+ CRT/Ia32/llshr.c | INTEL\r
CRT/Ia32/ulldiv.c | INTEL\r
CRT/Ia32/ullrem.c | INTEL\r
CRT/Ia32/ullshr.c | INTEL\r