Search found 249 matches

by frisian
May 13, 2019 20:52
Forum: General
Topic: SSE & floating point
Replies: 7
Views: 1702

Re: SSE & floating point

There a two ways to load a value into a xmm register. To show both methods I used the register method for xmm0 and the memory method for xmm1. I agree that the memory method is best way. It´s also possible to load integers into xmm registers and then convert them in single/double. I extended the pro...
by frisian
May 13, 2019 19:02
Forum: General
Topic: SSE & floating point
Replies: 7
Views: 1702

Re: SSE & floating point

Load a xmm register with a single. (dword) Reg32 is a 32bit register, mem32 is a 4 byte memory location. Mov d xmm0, reg32/mem32 Mov d reg32/mem32, xmm0 Load a xmm register with a double. (qword) Reg64 is a 64bit register, mem64 is a 8 byte memory location Mov q xmm0, reg64/mem64 Mov q reg64/mem64, ...
by frisian
May 10, 2019 20:43
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG Waiting for more issues I hope not too much :-) Problem with the latest version, it changes some code that was correct into code that crashes the program. program hailstone.bas. Works with the version from 1 May, but not with the version from 4 May. Function hailstone_fast(number As ULongInt) ...
by frisian
May 05, 2019 20:10
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG -select case issue is fixed. -asm name used as variable name is fixed. Every variable name is prefixed by an underscore. Maybe some collateral effects. -repeated and added lines issues are fixed. Can confirm that these items has been fixed. duplicated header issue ???? I can't reproduce the ca...
by frisian
May 02, 2019 21:43
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG 0/Conv, int and fix for float --> integer when SSE4_1 feature is not available done with your code for all integer variables except uinteger. I tested simulating the SEE41 lack but check on your side. for uinteger I'm not sure how it could be done. Could you propose a solution. Maybe VCVTS(D/S...
by frisian
Apr 04, 2019 21:21
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG @frisian Could you execute this code for testing if roundsd is supported or not. On your PC it should display "not supported". Thanks in advance. run your little test and the result is: 802009 roundsd/ss not supported By the way you didn't post the data for optim6 which doesn't work ...
by frisian
Mar 29, 2019 21:34
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG The instructions STMXCSR, LDMXCSR, CVTSD2SI and CVTTSD2SI will work on all the CPU's (old and new) To work with CVTSD2SI some extra code is needed, and space for 2x 32bit storage in memory. For testing I created two extra integer variables into the basic file. convert a double/single value to ...
by frisian
Mar 28, 2019 21:02
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG about my FP to integer problem dim as integer<32> test = 10,answer answer = rnd * 10 print answer My CPU is a AMD Athlon II X4 645 (Propus) based on the K10 core released Sep. 2010, my computer is from 2013. The following instructions sets are supported: MMX (+), 3DNow! (+), SSE, SSE2, SSE3, S...
by frisian
Mar 23, 2019 20:26
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG You have solved some problems, some of my programs are running correct, but the problem with FP calculation stored in a integer still goes wrong. The test crashes the program also command line switch -exx added wil result in no exe file. dim as integer<32> test = 10,answer answer = rnd * 10 pr...
by frisian
Mar 10, 2019 10:59
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG Only array of 8bit integer works correct, 16bit, 32bit of 64bit give wrong numbers. dim as integer<8> a(3), b = 1, c = 2 for i as integer = 1 to 3 : print a(i), : next : print a(b) = b : a(c) = c for i as integer = 1 to 3 : print a(i), : next : print swap a(b), a(c) print The next pieces of co...
by frisian
Mar 06, 2019 13:32
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG The following program does compile, but produces no output Department Numbers.bas [Rosetta Code] Dim As Integer fire, police, sanitation Print "police fire sanitation" Print "----------------------" For police = 2 To 7 Step 2 For fire = 1 To 7 If fire = police Then Continue...
by frisian
Mar 06, 2019 9:48
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) WDS / LNX
Replies: 494
Views: 107199

Re: Gas64 (no more use of gcc, only gas) :-)

@SARG I was very excited to see your effort to produce gas64 code, that I tried many programs but forgot to take notes. I hope to make up for it in the next few days. I have tested your fbc64_gas64.exe on small programs (most Rosetta Code stuff) I have a few programs that compiled and run correctly,...
by frisian
Feb 25, 2019 17:03
Forum: General
Topic: again: gen gas vs. gen gcc !
Replies: 1
Views: 1228

Re: again: gen gas vs. gen gcc [FIXED]

Replace the function Crater.sphereFunc with one of the three new versions. Change the test condition in if then . function Crater.sphereFunc(x as REAL, z as REAL, r as REAL) as REAL x/=r : z/=r dim as REAL tmp =1 - x*x - z*z if tmp > 0 then tmp = rSqr(tmp) tmp=rMax(tmp,0) return tmp*r end function S...
by frisian
Jul 02, 2018 19:03
Forum: General
Topic: Useful defines
Replies: 24
Views: 4277

Re: Useful defines

Although not defines, I'll contribute some of my favorite flavors of MOD for real numbers with Ceiling/Floor support. ' ======================================================================================== ' Force modulus x into the range a..b for Real Numbers ' =================================...
by frisian
Jun 26, 2018 22:28
Forum: General
Topic: 52 card shuffle
Replies: 22
Views: 4228

Re: 52 card shuffle

@IvorU The include file GMP_INT.bi , has a GMP_rnd and fac() function that can be used to create a random number Fac(n) calculates the factorial of n. GMP_rnd(n) return a integer number in the range from 0 to n-1. A little program to show how it can be done. #Include"gmp_int.bi" ' without ...