Skip to content

Commit

Permalink
gcc+Win64+asm fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Karel Miko committed Jan 16, 2014
1 parent 24b2ece commit 58e817a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ltc/headers/tomcrypt_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,15 @@ static inline unsigned RORc(unsigned word, const int i)
/* 64-bit Rotates */
#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)

static inline unsigned long ROL64(unsigned long word, int i)
static inline ulong64 ROL64(ulong64 word, int i)
{
asm("rolq %%cl,%0"
:"=r" (word)
:"0" (word),"c" (i));
return word;
}

static inline unsigned long ROR64(unsigned long word, int i)
static inline ulong64 ROR64(ulong64 word, int i)
{
asm("rorq %%cl,%0"
:"=r" (word)
Expand All @@ -380,15 +380,15 @@ static inline unsigned long ROR64(unsigned long word, int i)

#ifndef LTC_NO_ROLC

static inline unsigned long ROL64c(unsigned long word, const int i)
static inline ulong64 ROL64c(ulong64 word, const int i)
{
asm("rolq %2,%0"
:"=r" (word)
:"0" (word),"J" (i));
return word;
}

static inline unsigned long ROR64c(unsigned long word, const int i)
static inline ulong64 ROR64c(ulong64 word, const int i)
{
asm("rorq %2,%0"
:"=r" (word)
Expand Down

0 comments on commit 58e817a

Please sign in to comment.