Recent

Author Topic: [SOLVED] Compilation on 64bit Linux?  (Read 6096 times)

cybermonkey342

  • New Member
  • *
  • Posts: 42
    • Home of EGSL interpreter
[SOLVED] Compilation on 64bit Linux?
« on: March 14, 2012, 09:33:00 pm »
Hi, I thought I give BGRABitmap a try and wanted to compile it. I tried to install the package file and didn't have success.
The error is:
Code: [Select]
/home/markus/bgrabitmap5.7/bgrasse.pas(641,24) Error: Identifier not found "is_sse_cpu"
/home/markus/bgrabitmap5.7/bgrasse.pas(657) Fatal: There were 1 errors compiling module, stopping
in unit BGRASSE.
Well so far as I can see, "is_sse_cpu" needs the mmx unit which is loaded on CPUI386. A manually added uses clause results in
Quote
can't find unit mmx
So how do I compile BGRABitmap? (Using bgrabitmap5.7)
« Last Edit: March 17, 2012, 06:57:09 pm by cybermonkey342 »
--
Best regards

cybermonkey342

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: Compilation on 64bit Linux?
« Reply #1 on: March 17, 2012, 02:35:07 pm »
Oh I've made an error. It should work if you replace the code by :
Code: [Select]
 
  {$ifdef CPUI386}
  UseSSE := is_sse_cpu and FLAG_ENABLED_SSE;
  if UseSSE then
  begin   
    UseSSE2 := is_sse2_cpu;
    UseSSE3 := sse3_support
  end
  else
  {$endif}
  begin
    UseSSE := false;
    UseSSE2 := false;
    UseSSE3 := false;
  end;

By the way, maybe SSE support could be added to 64 processors too.
Conscience is the debugger of the mind

cybermonkey342

  • New Member
  • *
  • Posts: 42
    • Home of EGSL interpreter
Re: Compilation on 64bit Linux?
« Reply #2 on: March 17, 2012, 05:47:31 pm »
Ah, thanks, now it compiles!
--
Best regards

cybermonkey342

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: [SOLVED] Compilation on 64bit Linux?
« Reply #3 on: March 18, 2012, 04:13:33 pm »
I've uploaded changes on subversion.

Does your processor handles SSE ?
Conscience is the debugger of the mind

cybermonkey342

  • New Member
  • *
  • Posts: 42
    • Home of EGSL interpreter
Re: [SOLVED] Compilation on 64bit Linux?
« Reply #4 on: March 18, 2012, 08:02:15 pm »
I don't know but unit mmx seems not to be available for 64Bit Freepascal.
--
Best regards

cybermonkey342

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: [SOLVED] Compilation on 64bit Linux?
« Reply #5 on: March 18, 2012, 09:35:33 pm »
I've uploaded changes on subversion.

Does your processor handles SSE ?

64-bit x86_64 always supports at least SSE2, and all but the oldest (Athlon socket 754) support SSE3.

circular

  • Hero Member
  • *****
  • Posts: 4196
    • Personal webpage
Re: [SOLVED] Compilation on 64bit Linux?
« Reply #6 on: March 19, 2012, 05:52:23 pm »
So the SSE code should work on them too.

How can I check that it's a 64 bit processor ? For now, I am using {$IFDEF CPUI386}

Does asm written for 32 bit work in 64 bit mode ?
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018