Bug with DYNAMICCPU?

Just starting out? Need help? Post your questions and find answers here.
technicorn
Enthusiast
Enthusiast
Posts: 105
Joined: Wed Jan 18, 2006 7:40 pm
Location: Hamburg

Bug with DYNAMICCPU?

Post by technicorn »

It seems there is a problem with the /DYNAMICCPU switch on PB 5.21 LTS on windows 7 64bit.

When I use it with the 32 bit compiler the "Dynamic0", "Dynamic1" and so on labels are missing a colon, so you get an assembler error.

With the 64 Bit compiler there are two errors in the emited asm, first is, there is no code included at the start for checking and setting the procedure pointers.
Second, the indirect call to the procedures are of the form "call dword [f_someProcedureName]", I think the dword should be qword on 64 bit code and the memory place for the pointer is also of only dd size.

Maybe I'm the only one using the dynamic switch, but it would be nice, if someone could confirm this is a bug and if it would be corrected if so.

Greatings
technicorn
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Bug with DYNAMICCPU?

Post by ts-soft »

I think, you have misinterpreted this switch!

This switch is to use, for example mmx extension is supported by CPU and Lib/Userlib!
In the moment, there is IMHO no Userlib, that support this, so the switch is useles
in this time :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
technicorn
Enthusiast
Enthusiast
Posts: 105
Joined: Wed Jan 18, 2006 7:40 pm
Location: Hamburg

Re: Bug with DYNAMICCPU?

Post by technicorn »

ts-soft wrote:I think, you have misinterpreted this switch!

This switch is to use, for example mmx extension is supported by CPU and Lib/Userlib!
In the moment, there is IMHO no Userlib, that support this, so the switch is useles
in this time :wink:
It's just what I want to do, writing some user libs that use the most effective instructions on the cpu they are running on, to do some number crunching.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Bug with DYNAMICCPU?

Post by Danilo »

ts-soft wrote:In the moment, there is IMHO no Userlib, that support this, so the switch is useles
in this time :wink:
Aren't all PB libraries compiled with optimizations for MMX, 3Dnow!, SEE2/3/4 etc.?
Are PB internal libs compiled for 80386 processor only? Where can one find more informations about this?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Bug with DYNAMICCPU?

Post by PB »

> Where can one find more informations about this?

The manual says that "No PB functions actually support this feature
for now (it is ignored for them). However, some User Libraries include
such optimisations."

So, it doesn't matter what the CPU Optimisation setting is for apps
without UserLibs: it's not even used.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: Bug with DYNAMICCPU?

Post by Danilo »

PB wrote:> Where can one find more informations about this?

The manual says that "No PB functions actually support this feature
for now (it is ignored for them). However, some User Libraries include
such optimisations."

So, it doesn't matter what the CPU Optimisation setting is for apps
without UserLibs: it's not even used.
Thanks, just found it and wanted to delete my question.

Anyway, isn't it time to compile the PB libraries additionally with MMX and SSE(2,3,4) support,
just telling the C compiler to do the optimizations?
This could easily double or triple the speed for encryption + packer stuff and many other things,
on modern computers.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Bug with DYNAMICCPU?

Post by ts-soft »

Danilo wrote:Aren't all PB libraries compiled with optimizations for MMX, 3Dnow!, SEE2/3/4 etc.?
Are PB internal libs compiled for 80386 processor only? Where can one find more informations about this?
You can take a look on the libfunctions with "PB Tools for PB libs": http://www.realsource.de/downloads/doc_ ... or-pb-libs

I can't find a function with "functionname_mmx" or "functionname_sse"!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply