SSE2 instruction set problem

SSE2 instruction set problem

Postby Joszif » Mon Mar 19, 2018 9:24 am

Hello!

We have an application, that uses FiveWin, but it can not be executed on specific computers.
We found the source of the problem: the applications assembly code contains commands of SSE2 instruction set, so it can not be executed on CPUs, that doesn't support SSE2 instruction set.

(Pictures of our application's assembly code)
Image

Image

We found the code, that is in the hbvm.lib.
This file is part of the Harbour package, that we've got when we've purchased FiveWin.

(Picture of hbvm.lib file)
Image

We would like to rebuild these Harbour lib files, so that they will not contain commands of SSE/SSE2 instruction sets.
The Visual Studio compiler have a cl.exe option: /arch, that could be used (https://msdn.microsoft.com/en-us/library/7t5yh4fd.aspx),
but we haven't got the source of the Harbour lib files, that we got with the FiveWin package.


Can we have a new compilation of the Harbour lib files, without SSE/SSE2 instruction set command?


(We use FWH 17.11, with Harbour 3.2.)
Joszif
 
Posts: 5
Joined: Sat Jan 06, 2018 11:58 am

Re: SSE2 instruction set problem

Postby Antonio Linares » Mon Mar 19, 2018 9:59 am

Joszif,

The Harbour sources are available from here:
https://github.com/harbour/core

What C compiler are you using to build your apps ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SSE2 instruction set problem

Postby Joszif » Mon Mar 19, 2018 12:14 pm

Dear Antonio,

We use Visual Studio 2017 compiler (Exact version: 19.11.25547 for x86).

When we purchased FiveWin, we got compiled Harbour lib files, in a zip file, named Harbour_vsc2017_32bits_20170325.zip.
This zip contains every Harbour lib files, including the hbvm.lib file that we mentioned in the previous post.

The Harbour version that can be downloaded from the official site, was not good for us, because it threw the following linker error:
error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in [filename].OBJ.

I think the solution is a new Harbour_vsc2017_32bits_20170325.zip that is made by using /arch compiler option.

What do you think about it?

Thank you,

Joszif
Joszif
 
Posts: 5
Joined: Sat Jan 06, 2018 11:58 am

Re: SSE2 instruction set problem

Postby AntoninoP » Mon Mar 19, 2018 1:17 pm

I think your only possibility is download and compile harbour yourself, with visual studio it is pretty simple: start the "developer-command-prompt" and run "win-make.exe" in the harbour root.
In your case you must modify the file config\win\msvc.mk where sets up th CFLAGS and/or the LDFLAGS
Just for curiosity, which processor your program needs to run on? the SS2 is from 2000, and now they are in every system...
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

Re: SSE2 instruction set problem

Postby Antonio Linares » Mon Mar 19, 2018 6:43 pm

Joszif,

> error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in [filename].OBJ.

Please copy here the complete error. I don't find any filename.* file in the harbour sources

> I think the solution is a new Harbour_vsc2017_32bits_20170325.zip that is made by using /arch compiler option.

You call pull the Harbour sources from 2017/03/25 from Github
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SSE2 instruction set problem

Postby Joszif » Tue Mar 20, 2018 2:51 pm

Hello,

Thank you for your help, the problem has been solved.

We downloaded the Harbour core from github as Antonio suggested and then we rebuilt the source as AntonioP suggested.
These newly created lib files don't contain SSE2 specific commands.

Anyway, there are computers in our network that has old, mostly AMD processors, that don't support SSE2.

Thank you for your help!

Joszif
Joszif
 
Posts: 5
Joined: Sat Jan 06, 2018 11:58 am

Re: SSE2 instruction set problem

Postby Antonio Linares » Tue Mar 20, 2018 7:13 pm

Joszif,

Glad to know that you solved it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: dtoledo, Google [Bot], nageswaragunupudi and 60 guests