NO

Author Topic: tiger-hash -> different behaviour in PellesC and DevCpp/g  (Read 3093 times)

kobold

  • Guest
tiger-hash -> different behaviour in PellesC and DevCpp/g
« on: August 05, 2006, 11:27:23 PM »
Weeks ago i tried to compile the tiger hash reference implementation with PellesC.
After a while it ran and it gave back some test checksums.

The problem was: the values where not the same as the (correct) expected output.

I tried to compile the program with LccWin32 with the exact same results and after that with DevCpp. The curious thing: with DevCpp the results where exactly the same as they should from the tiger hash webpage.

I tried to unroll all the defines and write them as functions, but PellesC was not able to give me the correct restults.  :cry:

I forgot: http://www.cs.technion.ac.il/~biham/Reports/Tiger/ (the main page)
The download: http://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger-src.zip
The output should look like: http://www.cs.technion.ac.il/~biham/Reports/Tiger/testresults.html


My results:

DevCPP V. 4.9.9.2:

Hash of "":
        24F0130C63AC9332 16166E76B1BB925F F373DE2D49584E7A
Hash of "abc":
        F258C1E88414AB2A 527AB541FFC5B8BF 935F7B951C132951
.
.
.

   ***

PellesC V. 4.00.50:

Hash of "":
        B9DE274313C74076 A295FEB8EFAEC7E5 1F839B21AF9BD1AD
Hash of "abc":
        0BE2F4950C9E80D7 288015AD9AE30AE0 B095AE5A2B53B38F
.
.
.


The speed of the PellesC & LccWin32 Versions and DevCpp where different too. PellesC & LccWin32 ~ 25 mb/sec and DevCpp ~ 40 mb/s.

Some ideas?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
tiger-hash -> different behaviour in PellesC and DevCpp/g
« Reply #1 on: August 06, 2006, 11:33:08 AM »
#define the symbol "__i386__" and it will compile with correct endianity.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

kobold

  • Guest
tiger-hash -> different behaviour in PellesC and DevCpp/g
« Reply #2 on: August 06, 2006, 12:18:28 PM »
thx - a wonder... it works! I thought the define "__i386__" was predefined in PellesC.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
tiger-hash -> different behaviour in PellesC and DevCpp/g
« Reply #3 on: August 06, 2006, 01:37:32 PM »
Time to "sell" the help file again... ;-)

"Command line tools" -> "POCC compiler" -> "Predefined preprocessor symbols" ...
/Pelle