|
Message-ID: <CAFYn=yBW+a+63eYs-NA2oFNRVuV9Mz8=wKXwMadGxpMENbKQZA@mail.gmail.com>
Date: Fri, 12 Jul 2013 22:12:18 -0400
From: Yaniv Sapir <yaniv@...pteva.com>
To: john-dev@...ts.openwall.com
Subject: Re: Parallella: bcrypt
Katja,
IADD and FADD are aliases of the same instruction! Both are performed on
the FPU, adding two registers were the mode depends on the ARITHMODE field
in the CONFIG register, The disassembler has no way to know, based on the
opcode of the instruction, what is the arithmetic mode in effect, so it
emits the FADD output.
If you look at the Decode Table in the Architecture Manual, you'll see that
IADD and FADD share the same opcodes.
The ADD instruction is performed on the IALU, and hence always adds two
signed integers.
The compiler switch tells the compiler to assume an FPU mode on an entry to
a function, so to avoid unnecessary CONFIG register programming for mode
switching.
Yaniv.
On Fri, Jul 12, 2013 at 9:54 PM, Katja Malvoni <kmalvoni@...il.com> wrote:
> Hi Yaniv,
>
> How to force e-gcc to use iadd instructions? I'm using inline assembly and
> when I use iadd it gets translated to fadd. If I use add, I get add in
> objdump. I tried to configure E_CONFIG:
>
> movfs r20, config
> mov r19, %low(0x00080000)
> movt r19, %high(0x00080000)
> orr r20, r20, r19 ; set E_CONFIG[19] to 1
> mov r19, %low(0x11191111)
> movt r19, %high(0x11191111)
> and r20, r20, r19 ; set E_CONFIG[18:17] to 00
> movts config, r20
>
> But this doesn't help, in objdump I still get fadd instead of iadd.
> I'm compiling with e-gcc -std=c99 -T ${ELDF} e_bcrypt.c -O2 -mfp-mode=int
> -o e_bcrypt.elf -le-lib
>
> Katja
>
>
> On Sat, Jul 13, 2013 at 12:23 AM, Katja Malvoni <kmalvoni@...il.com>wrote:
>
>> Hi Yaniv,
>>
>> On Sat, Jul 13, 2013 at 12:11 AM, Yaniv Sapir <yaniv@...pteva.com> wrote:
>>
>>> Hi Katja,
>>>
>>> I am sorry I could not put some time into investigating the problem
>>> during the last couple of days. Hopefully I will be able look at it during
>>> the weekend. Are you still stuck at the same place, or were you able to
>>> overcome the problem? Is the code at the same place?
>>>
>>
>> No problem. I'm still stuck at the same place. Code is at the same place
>> and I added code that results in mmap failure error, it's in
>> /home/kmalvoni/integration/JohnTheRipper
>>
>> Thank you,
>>
>> Katja
>>
>
>
>
> --
> Katja
>
--
===========================================================
Yaniv Sapir
Adapteva Inc.
1666 Massachusetts Ave, Suite 14
Lexington, MA 02420
Phone: (781)-328-0513 (x104)
Email: yaniv@...pteva.com
Web: www.adapteva.com
============================================================
CONFIDENTIALITY NOTICE: This e-mail may contain information
that is confidential and proprietary to Adapteva, and Adapteva hereby
designates the information in this e-mail as confidential. The information
is
intended only for the use of the individual or entity named above. If you
are
not the intended recipient, you are hereby notified that any disclosure,
copying,
distribution or use of any of the information contained in this
transmission is
strictly prohibited and that you should immediately destroy this e-mail and
its
contents and notify Adapteva.
==============================================================
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.