fix scrypt-jane OS X compile - again - revert the last changes and disable all assembler or we run in to problems with older LLVM versions
This commit is contained in:
parent
1b8b4da925
commit
cd0f0a5797
2 changed files with 8 additions and 16 deletions
|
|
@ -179,11 +179,8 @@
|
||||||
#define GNU_AS3(x, y, z) #x ", " #y ", " #z ";\n"
|
#define GNU_AS3(x, y, z) #x ", " #y ", " #z ";\n"
|
||||||
#define GNU_AS4(x, y, z, w) #x ", " #y ", " #z ", " #w ";\n"
|
#define GNU_AS4(x, y, z, w) #x ", " #y ", " #z ", " #w ";\n"
|
||||||
#define GNU_ASFN(x) "\n_" #x ":\n" #x ":\n"
|
#define GNU_ASFN(x) "\n_" #x ":\n" #x ":\n"
|
||||||
#if defined(MACOS_X) || (defined(__APPLE__) & defined(__MACH__))
|
|
||||||
#define GNU_ASJ(x) #x "\n"
|
|
||||||
#else
|
|
||||||
#define GNU_ASJ(x) ".att_syntax prefix\n" #x "\n.intel_syntax noprefix\n"
|
#define GNU_ASJ(x) ".att_syntax prefix\n" #x "\n.intel_syntax noprefix\n"
|
||||||
#endif
|
|
||||||
#define a1(x) GNU_AS1(x)
|
#define a1(x) GNU_AS1(x)
|
||||||
#define a2(x, y) GNU_AS2(x, y)
|
#define a2(x, y) GNU_AS2(x, y)
|
||||||
#define a3(x, y, z) GNU_AS3(x, y, z)
|
#define a3(x, y, z) GNU_AS3(x, y, z)
|
||||||
|
|
@ -239,17 +236,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define asm_naked_fn_proto(type, fn) extern type asm_calling_convention fn
|
#define asm_naked_fn_proto(type, fn) extern type asm_calling_convention fn
|
||||||
#if defined(MACOS_X) || (defined(__APPLE__) & defined(__MACH__))
|
|
||||||
#define asm_naked_fn_end(fn) );
|
|
||||||
|
|
||||||
#define asm_gcc() __asm__ __volatile__(
|
|
||||||
#define asm_gcc_parms()
|
|
||||||
#else
|
|
||||||
#define asm_naked_fn_end(fn) ".att_syntax prefix;\n" );
|
#define asm_naked_fn_end(fn) ".att_syntax prefix;\n" );
|
||||||
|
|
||||||
#define asm_gcc() __asm__ __volatile__(".intel_syntax noprefix;\n"
|
#define asm_gcc() __asm__ __volatile__(".intel_syntax noprefix;\n"
|
||||||
#define asm_gcc_parms() ".att_syntax prefix;"
|
#define asm_gcc_parms() ".att_syntax prefix;"
|
||||||
#endif
|
|
||||||
#define asm_gcc_trashed() __asm__ __volatile__("" :::
|
#define asm_gcc_trashed() __asm__ __volatile__("" :::
|
||||||
#define asm_gcc_end() );
|
#define asm_gcc_end() );
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
12
vendor/scrypt-jane/code/scrypt-jane-portable.h
vendored
12
vendor/scrypt-jane/code/scrypt-jane-portable.h
vendored
|
|
@ -136,12 +136,7 @@
|
||||||
#define CDECL __attribute__((cdecl))
|
#define CDECL __attribute__((cdecl))
|
||||||
#undef STDCALL
|
#undef STDCALL
|
||||||
#define STDCALL __attribute__((stdcall))
|
#define STDCALL __attribute__((stdcall))
|
||||||
#if defined(MACOS_X) || (defined(__APPLE__) & defined(__MACH__))
|
|
||||||
#undef ALIGN
|
|
||||||
#define ALIGN(n)
|
|
||||||
#else
|
|
||||||
#define ALIGN(n) __attribute__((aligned(n)))
|
#define ALIGN(n) __attribute__((aligned(n)))
|
||||||
#endif
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||||
|
|
@ -305,7 +300,14 @@ scrypt_ensure_zero(void *p, size_t len) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(MACOS_X) || (defined(__APPLE__) & defined(__MACH__))
|
||||||
|
static size_t
|
||||||
|
detect_cpu(void) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
#include "scrypt-jane-portable-x86.h"
|
#include "scrypt-jane-portable-x86.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(asm_calling_convention)
|
#if !defined(asm_calling_convention)
|
||||||
#define asm_calling_convention
|
#define asm_calling_convention
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue