Search found 3343 matches

by srvaldez
Mar 13, 2024 22:22
Forum: General
Topic: clang recommendation
Replies: 0
Views: 668

clang recommendation

the gcc toolchain distributed by Equation Solutions is for the most part statically linked, so I thought what would happen if I added clang ? so I chose the llvm toolchain by https://github.com/mstorsjo/llvm-mingw/releases as in my previous experiment I added clang.exe and try to compile, it gave th...
by srvaldez
Mar 13, 2024 18:06
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

you can access named variables in asm att but not in asm att with intel syntax here's the quadraticRoot function using named variables, the variables get ucased and a $1 is appended to the right, if you are new to this and you want to tinker with inline att asm then the following example may serve a...
by srvaldez
Mar 13, 2024 10:39
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

here's an example that uses ".intel_syntax noprefix" you can use Intel syntax asm when compiling with -asm att but accessing variables by name is problematic #cmdline "-w all -arch native -asm att -gen clang -Wc -O2" #ifdef __FB_WIN32__ #ifdef __FB_64BIT__ function iPower naked (...
by srvaldez
Mar 13, 2024 10:25
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

just a couple of samples sample1 'I forgot when I wrote this and how it works #cmdline "-w all -arch native -asm att -gen clang -Wc -O2" #ifdef __FB_WIN32__ #ifdef __FB_64BIT__ type bar as double d as long l as longint ld as zstring*19 sz end type function foo naked () as bar asm "fld...
by srvaldez
Mar 13, 2024 8:58
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

deltarho[1859] from what I have seen, using clang with FB doesn't work with intel asm, don't know the details as to why. I will try some inline att asm and see what happens. <edit> all seems to work ok with att inline asm, I tested with one file containing hundreds of lines of inline asm in att syntax
by srvaldez
Mar 11, 2024 15:49
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

the following gives asm errors if compiled without -asm att

Code: Select all

dim as double pi=3.1415926535897932
dim as long i

i=int(pi)
? i
the problem is with i=int(pi)
by srvaldez
Mar 11, 2024 15:46
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

you can get it from https://u.pcloud.link/publink/show?code ... h6yXwC0uu7
the toolchain is from https://winlibs.com/ GCC 13.2.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 18.1.1 + MinGW-w64 11.0.1 (MSVCRT) - release 6 (LATEST)
by srvaldez
Mar 11, 2024 14:59
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

the following program compiles ok in 32-bit without -asm att the matrix multiplication is from the Rosetta code, but the demo is mine, it shows how drastically the precision is lost type Matrix dim as double m( any , any ) declare constructor ( ) declare constructor ( byval x as uinteger , byval y a...
by srvaldez
Mar 11, 2024 14:47
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

in 32-bit with -gen clang the following will give the error error: unsupported relocation type push offset L_.str

Code: Select all

print "Hello World"
compiles ok if you use -asm att
but in my larger test program there were many asm errors not related to strings
by srvaldez
Mar 11, 2024 14:27
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

Re: -gen clang

about the -asm att option, I tried other small programs and they compile ok without that option, it's a mystery why that option is required for this particular program, there are no inline asm statements used
by srvaldez
Mar 11, 2024 13:28
Forum: General
Topic: -gen clang
Replies: 64
Views: 3654

-gen clang

out of curiosity I tried compiling with -gen clang, other than -gen clang no other options are needed for 64-bit but for 32-bit you must also use -asm att I wanted my FB package to only have the needed extra files for clang, so I set geany to compile for 64-bit with -gen clang, and after adding clan...
by srvaldez
Mar 05, 2024 18:57
Forum: Sources, Examples, Tips and Tricks
Topic: CORDIC - Rosetta Code
Replies: 0
Views: 407

CORDIC - Rosetta Code

the FreeBASIC translation of the Julia code is wrong https://rosettacode.org/wiki/CORDIC#FreeBASIC in Julia the variable v looks like a vector, v = [1, 0] # start with 2-vector cosine and sine of zero and in the call to the cordic function cosθ, sinθ = cordic(θr) cosθ and sinθ should have the respec...
by srvaldez
Mar 04, 2024 19:48
Forum: Windows
Topic: QuickLook -- a document previewer
Replies: 0
Views: 349

QuickLook -- a document previewer

on MacOS it's a standard feature to be able to preview all kinds of files by simply selecting the file and then pressing the space bar, but it's not a standard feature on Windows, but today I found a program that does just that, QuickLook. after launching QuickLook it keeps running in the background...
by srvaldez
Mar 01, 2024 20:09
Forum: General
Topic: [solved]Help with UDT and cptr
Replies: 4
Views: 651

Re: Help with UDT and cptr

you need to use parenthesis

Code: Select all

function works( p as byte ptr) as ulongint
    return (*cptr(UDT ptr, p)).b
end function
by srvaldez
Feb 17, 2024 19:14
Forum: Sources, Examples, Tips and Tricks
Topic: "Lite regulation" function ('regulateLite()') to be integrated into user loop for FPS control
Replies: 25
Views: 4690

Re: "Lite regulation" function ('regulateLite()') to be integrated into user loop for FPS control

fxm, I think that it would be good to have it in the manual, this thread may get buried and hard to find