Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: New C compiler, tried on Crafty

Author: Jeremiah Penery

Date: 00:50:24 04/25/00

Go up one level in this thread


On April 25, 2000 at 02:44:26, Dann Corbit wrote:

>On April 25, 2000 at 02:22:07, Jeremiah Penery wrote:
>
>>On April 24, 2000 at 17:56:28, Dan Andersson wrote:
>>
>>>http://www.codeplay.com/
>>>VectorC, might be something?
>>
>>It's interesting that on their benchmark page, they DON'T compare it with MSVC.
>>:P
>>
>>It looks interesting, however.  I'm going to try it with Crafty.
>
>If you actually get it to compile stuff, I'd like to know what you did.
>It can't even seem to find a local include file in my tests.

Try doing this:

In MSVC, go to Tools->Options->Directories.  Then for each type in the "Show
Directories For:", add the path where you put the VectorC files.  Then in MSVC
you can put "vectorc /vc" in place of "cl" for the compiler (CC = vectorc /vc).
You can also add some special VectorC options to this, as in:  "vectorc /target
IA/PII /optimize 10 /vc"

The problem I'm having now is that it's not wanting to compile properly.  When I
tell it to compile for the PII architecture, I get the following error:

x1.c(419) : error: INTERNAL ERROR: MMX and floating point unit used in same
block
Statement: Temp#:8 := -1 >> Temp#:8: u64   ; line: 419

The relevant code is:

BITBOARD Mask(int arg1) {
  register BITBOARD i;
  i=(BITBOARD) -1;
  if (arg1 == 128)
    return(0);
  else if (arg1 > 64)
    return(i>>(arg1-64));  //This is where the problem occurs
  else
    return(i<<(64-arg1));
}

If I don't tell it to compile specifically for the PII, I get:

x1.c(8780) : error: Constant expected
x1.c(8783) : error: Constant expected
x1.c(8786) : error: Constant expected
x1.c(8789) : error: Constant expected

And the relevant lines are:

  switch (check_direction) {
    case +1:
      target=plus1dir[king_square-1] ^ plus1dir[checking_square];
      break;
    case +7:   // Here's the first error.  The rest occur on the following
               // 3 "case +x" statements.
      target=plus7dir[king_square-7] ^ plus7dir[checking_square];
      break;
    case +8:
      target=plus8dir[king_square-8] ^ plus8dir[checking_square];
      break;
    case +9:
      target=plus9dir[king_square-9] ^ plus9dir[checking_square];
      break;
    case -1:
      target=minus1dir[king_square+1] ^ minus1dir[checking_square];
      break;
    case -7:
      target=minus7dir[king_square+7] ^ minus7dir[checking_square];
      break;
    case -8:
      target=minus8dir[king_square+8] ^ minus8dir[checking_square];
      break;
    case -9:
      target=minus9dir[king_square+9] ^ minus9dir[checking_square];
      break;
    default:
      target=0;
      break;
  }


Can anyone offer suggestions?

Thanks,
Jeremiah



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.