Metrowerks for Motorola tune-up.
This commit is contained in:
parent
2e97d4f9f5
commit
1eab9a1fbb
@ -182,8 +182,11 @@
|
||||
# if defined(_MSC_VER)
|
||||
# define ROTATE(a,n) _lrotl(a,n)
|
||||
# elif defined(__MWERKS__)
|
||||
# ifdef __POWERPC__
|
||||
# if defined(__POWERPC__)
|
||||
# define ROTATE(a,n) __rlwinm(a,n,0,31)
|
||||
# elif defined(__MC68K__)
|
||||
/* Motorola specific tweak. <appro@fy.chalmers.se> */
|
||||
# define ROTATE(a,n) ( n<24 ? __rol(a,n) : __ror(a,32-n) )
|
||||
# else
|
||||
# define ROTATE(a,n) __rol(a,n)
|
||||
# endif
|
||||
|
@ -103,9 +103,16 @@
|
||||
# define HASH_INIT SHA1_Init
|
||||
# define HASH_BLOCK_HOST_ORDER sha1_block_host_order
|
||||
# define HASH_BLOCK_DATA_ORDER sha1_block_data_order
|
||||
# if defined(__MWERKS__) && defined(__MC68K__)
|
||||
/* Metrowerks for Motorola fails otherwise:-( <appro@fy.chalmers.se> */
|
||||
# define Xupdate(a,ix,ia,ib,ic,id) do { (a)=(ia^ib^ic^id); \
|
||||
ix=(a)=ROTATE((a),1); \
|
||||
} while (0)
|
||||
# else
|
||||
# define Xupdate(a,ix,ia,ib,ic,id) ( (a)=(ia^ib^ic^id), \
|
||||
ix=(a)=ROTATE((a),1) \
|
||||
)
|
||||
# endif
|
||||
|
||||
# ifdef SHA1_ASM
|
||||
# if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user