Wiki improvements

Forum for discussion about the documentation project.
Post Reply
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Wiki improvements

Post by SARG »

Maybe not exhaustive...

With Intel syntax.

Code: Select all

no compilation error but error when execution
---------------------------------------------
ax cx dx bx si di sp bp r8w r9w r10w r11w r12w r13w r14w R15w
rax rcx rdx rbx rsi rdi rsp rbp r8 r9 r10 r11 r12 r13 r14 R15

tbyte word dword qword fword oword mmword xmmword ymmword zmmword

Code: Select all

Compilation error (assembler)
-----------------------------
al cl dl bl sil dil spl bpl r8b r9b r10b r11b r12b r13b r14b r15b  ah bh ch dh rip eip 
eax ecx edx ebx esi edi esp ebp r8d r9d r10d r11d r12d r13d r14d R15d
st 
eq gt lt ge le ne

mm0 -->mm7
xmm0 --> xmm15
ymm0 --> ymm15
zmm0 --> zmm31
dr0 -->dr7

CS DS SS ES FS GS
Last edited by SARG on Aug 31, 2021 15:59, edited 5 times in total.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

Added __FB_OPTIMIZE__ intrinisic define:
- KeyPgDdfboptimize → fxm [new page '__FB_OPTIMIZE__']
- CatPgDddefines → fxm [added link to new page '__FB_OPTIMIZE__']
- CatPgFullIndex → fxm [added link to new page '__FB_OPTIMIZE__']
- CatPgFunctIndex → fxm [added link to new page '__FB_OPTIMIZE__']
- PrintToc → fxm [added link to new page '__FB_OPTIMIZE__']
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

@Jeff,

Regarding the addition of the '-trace' compile option (which seems to be complete):
For now, however, I don't see anything, neither in the last 'changelog.txt', nor in the last daily build (2021-08-29 02:01) of St_W (error 81: Invalid command-line option, "-trace").
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Wiki improvements

Post by srvaldez »

@SARG
you missed a few :)

Code: Select all

no compilation error but error when execution
st fword oword mmword xmmword ymmword

Code: Select all

Compilation error (assembler)
eq gt lt ge le ne
dr0 -->dr7
as far as I tested there's no problem when using -asm att
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Wiki improvements

Post by SARG »

@srvaldez thanks

For me 'st' threws an error at compilation

zmmword can also be added

List completed in my first post.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Post by coderJeff »

fxm wrote:Regarding the addition of the '-trace' compile option (which seems to be complete):
Only applies to the documentation tools.
See doc/libfbdoc/changelog.txt
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Wiki improvements

Post by srvaldez »

@SARG
we forgot tbyte in the no error but crash list
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Wiki improvements

Post by dodicat »

regarding the __FB_OPTIMIZE__ , I really thought that the request was for being able to set an optimisation level in the code and not necessarily the command line.
#lang "fb"
#optimize "-Wc O3"
Or something.
This would be nice for fbide users everywhere.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

srvaldez wrote:as far as I tested there's no problem when using -asm att
I reworded the warning sentence in the documentation.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Wiki improvements

Post by srvaldez »

thank you fxm :)
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

@Jeff,

About this new documentation warning sentence:
Warning for 64-bit compiler only: Regarding the choice of user procedure identifier names, an additional restriction to the normal Identifier Rules also excludes in the global namespace all register names or other symbols issued from the only 'intel' format assembler when it is used (the one by default, no problem with 'att' format), because they causes assembler errors or runtime bugs (due to the 64-bit compiler not decorating procedure names).
Not joining, for user procedure identifiers, the exhaustive list of the forbidden names issued from the 'intel' format assembler syntax is troublesome especially for the names which only induce a runtime error and not an assembler error.
What do you think ?


[edit]
For the moment, I have added the two user procedure identifier lists that induce the assembler errors and the runtime errors.
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Wiki improvements

Post by SARG »

Found also ah, bh, ch, dh only compilation error.

The issue comes back from time to time so why not add the list.

I don't know/remember if there is a page talking about running crashes. if the case a link to this point would be interesting.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

SARG wrote:Found also ah, bh, ch, dh only compilation error.
Your two lists (viewtopic.php?p=285109#p285109) has been incorrectly updated.

[edit]
OK now.
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Post by coderJeff »

dodicat wrote:regarding the __FB_OPTIMIZE__ , I really thought that the request was for being able to set an optimisation level in the code and not necessarily the command line.
That makes sense too.

It's been on the TODO list a long time to add '#cmdline "args..."'
I've half implemented it and I have some hang-ups about it before adding it in.
- can't just allow any option because by the time fbc winds up to actual parse the #cmdline statement, lots of state is already initialized (like target, and backend, etc). If it is allowed, then would require a restart of the parser - like what #lang statement does
- conflicts between what the user specifies on the fbc command line and what the source author puts in source code - how to resolve?

Do you know if anyone is able to build FBIDE from sources?
coderJeff
Site Admin
Posts: 4313
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Post by coderJeff »

fxm wrote:@Jeff,
What do you think ?
I think I am not sure what you are asking of me.
If I can make a suggestion...
Add a section for "Platform Differences" to Identifier Rules and move all the warnings and notes there. Then link there from Sub/Function or where ever. I think there was also notes about local variables and goto labels for LT* named symbols. Also there was a forum post about 'KS' or something on linux that conflicted with a public symbol in ncurses or termcap (or something).

I don't know if there are other or different conflicts for other CPU types like arm or powerpc, not just x86 / x86_64.
Post Reply