提交 946cbf67 编写于 作者: B Bodo Möller

Don't use inline assembler when configured for "no-asm".

上级 170afce5
...@@ -330,7 +330,10 @@ my $options=""; ...@@ -330,7 +330,10 @@ my $options="";
foreach (@ARGV) foreach (@ARGV)
{ {
if (/^no-asm$/) if (/^no-asm$/)
{ $no_asm=1; } {
$no_asm=1;
$flags .= "-DNO_ASM ";
}
elsif (/^no-threads$/) elsif (/^no-threads$/)
{ $no_threads=1; } { $no_threads=1; }
elsif (/^threads$/) elsif (/^threads$/)
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
#ifndef PEDANTIC #ifndef PEDANTIC
# if defined(_MSC_VER) # if defined(_MSC_VER)
# define ROTATE(a,n) _lrotl(a,n) # define ROTATE(a,n) _lrotl(a,n)
# elif defined(__GNUC__) && __GNUC__>=2 # elif defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM)
/* /*
* Some GNU C inline assembler templates. Note that these are * Some GNU C inline assembler templates. Note that these are
* rotates by *constant* number of bits! But that's exactly * rotates by *constant* number of bits! But that's exactly
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
* Engage compiler specific "fetch in reverse byte order" * Engage compiler specific "fetch in reverse byte order"
* intrinsic function if available. * intrinsic function if available.
*/ */
# if defined(__GNUC__) && __GNUC__>=2 # if defined(__GNUC__) && __GNUC__>=2 && !defined(NO_ASM)
/* some GNU C inline assembler templates by <appro@fy.chalmers.se> */ /* some GNU C inline assembler templates by <appro@fy.chalmers.se> */
# if defined(__i386) && !defined(I386_ONLY) # if defined(__i386) && !defined(I386_ONLY)
# define BE_FETCH32(a) ({ register unsigned int l=(a);\ # define BE_FETCH32(a) ({ register unsigned int l=(a);\
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
#define ROTATE(a,n) _lrotl(a,n) #define ROTATE(a,n) _lrotl(a,n)
#elif defined(__GNUC__) && !defined(PEDANTIC) #elif defined(__GNUC__) && !defined(PEDANTIC)
/* some inline assembler templates by <appro@fy.chalmers.se> */ /* some inline assembler templates by <appro@fy.chalmers.se> */
#if defined(__i386) #if defined(__i386) && !defined(NO_ASM)
#define ROTATE(a,n) ({ register unsigned int ret; \ #define ROTATE(a,n) ({ register unsigned int ret; \
asm ("roll %1,%0" \ asm ("roll %1,%0" \
: "=r"(ret) \ : "=r"(ret) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册