Re: [Tinycc-devel] The procedure entry point _strtoui64 could not be loc

2020-12-24 Thread Vladimir Vissoultchev
JFYI, grishka removed _strtoi64 dependency in 32-bit executable in commit 9f6b652 so now tcc.exe works and can self-compile on Win2000 cheers, From: Tinycc-devel [mailto:tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of Vaidas BoQsc Sent: Tuesday, December 15, 2020 4:22 PM

Re: [Tinycc-devel] Report - A decying support for Windows 2000 Professional SP4

2020-12-01 Thread Vladimir Vissoultchev
You are probably trying to run x64 build on x86 version of Win2000 Even if you test the x86 build with c:> build-tcc.bat -t 32 -i c:\tcc1 c:> set path=c:\tcc1;%path% c:> build-tcc.bat -c tcc -t 32 -i c:\tcc . . . you'll find out that it

Re: [Tinycc-devel] How do I rename exported DLL function?

2019-05-15 Thread Vladimir Vissoultchev
10x, Michael cheers, -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of Michael Matz Sent: Wednesday, May 15, 2019 7:37 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] How do I rename exported DLL function? Hi, > I

Re: [Tinycc-devel] How do I rename exported DLL function?

2019-05-14 Thread Vladimir Vissoultchev
Hi, I just pushed a simple fix for the asm_label hack that's used to specify DLL export name and accidentally got dropped in 0.9.27 https://github.com/TinyCC/tinycc/commit/1dd6842654c8f8f6bf1a94364f0fd23ed10cc7e1 It seems I cannot push to mob as of now. Someone care to merge?

Re: [Tinycc-devel] tcc doesn't work on OSX unless used via -run which isn't sufficient for most use cases

2019-01-07 Thread Vladimir Vissoultchev
> I wonder why Vladimir allows Github issues to be created if he does not react to them. I just wanted to confuse people and generate angry traffic on this mailing list. . . not. This is a mob programming project and there are no official owners/maintainers so it's very hard to move the repo to

[Tinycc-devel] Travis CI on github mirror

2018-08-15 Thread Vladimir Vissoultchev
https://travis-ci.org/TinyCC/tinycc This is setup to fire on pull requests to dev/mob branches there too. cheers, ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] build-tcc.bat: %PROCESSOR_ARCHITECTURE% environment detection issue

2017-02-16 Thread Vladimir Vissoultchev
> My build (msys + mingw32, win10 64bits) fails on 'tiny_impdef libtcc.dll -o libtcc\libtcc.def' Try MinGW-w64 for both 32 and 64 bit targets as gcc form original MinGW cannot produce x64 binaries, I think. With MinGW-w64 toolchain both -t 32 and -t 64 should be possible and you get the

Re: [Tinycc-devel] VS2015 / was Ready for Release 0.9.27

2017-02-14 Thread Vladimir Vissoultchev
> I have only this warning: > > C>tiny_impdef libtcc.dll -o libtcc\libtcc.def > tiny_impdef: could not get exported function names. You might get this if you use vcvars32.bat on x64 platforms because the .bat file thinks that cl.exe will produce x64 executables, so compiled tiny_impdef.exe

Re: [Tinycc-devel] Fw: Ready for Release 0.9.27

2017-02-09 Thread Vladimir Vissoultchev
[mailto:tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of grischka Sent: Thursday, February 9, 2017 7:28 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] Fw: Ready for Release 0.9.27 Vladimir Vissoultchev wrote: >> * can someone please check & possibly fix the MSV

Re: [Tinycc-devel] Fw: Ready for Release 0.9.27

2017-02-09 Thread Vladimir Vissoultchev
> * can someone please check & possibly fix the MSVC solution files in > win32/VS2015? Otherwise I'm tempted to remove that folder. Just fixed project files in mob to generate config.h from VERSION as a pre-build task, so solution should compile ok on fresh checkout (w/o running build-tcc.bat

Re: [Tinycc-devel] undefined reference to tcc_relocate

2016-07-14 Thread Vladimir Vissoultchev
Hi, Are you using MinGW or Cygwin? Here I can compile the sample w/ MinGW just ok. Final `a.exe` will fail looking for `tcclib.h` -- have to copy it to `win32\include` to run sample as is. Probably there is name mangling issues with Cygwin version as `libtcc.dll` exports are not decorated w/ a

Re: [Tinycc-devel] Inserting spaces in output from -E

2016-05-05 Thread Vladimir Vissoultchev
> One remark: I believe in the tcc_preprocess routine s1->ppfp > is always set, otherwise it wouldn't have been called. I think it can be NULL when dffp is set for the dflag output when dumping defines only (w/o actual preprocessor output). cheers,

Re: [Tinycc-devel] vectorize the curent hash implementation

2016-04-23 Thread Vladimir Vissoultchev
vectorize the curent hash implementation On 4/23/2016 4:26 PM, Vladimir Vissoultchev wrote: > [snip snip snip] > (Note: SSE calc loop oversteps input string so file buffer has to > overallocated by 8 bytes in `tcc_open_bf`) > > Unfortunately there was no noticable improvement, whi

Re: [Tinycc-devel] vectorize the curent hash implementation

2016-04-23 Thread Vladimir Vissoultchev
Hi, I did some test with the original rolling hash slightly tweaked to this: #define TOK_HASH_INIT 0 #define TOK_HASH_PRIME 263 #define TOK_HASH_FUNC(h, c) ((h)*TOK_HASH_PRIME + (c)) ... and was able to replace this hash calculating loop: h = TOK_HASH_INIT; for(i=0;i

Re: [Tinycc-devel] Preprocessor performance tuning

2016-04-19 Thread Vladimir Vissoultchev
l 19, 2016 11:05 AM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] Preprocessor performance tuning Hi Vladimir Vissoultchev > Just comitted the patch to mob. Before that fixed the failing test and > split the patch in two so that the allocators could easily be reversed > if prob

Re: [Tinycc-devel] '.' as code position in asm_expr_unary()

2016-04-18 Thread Vladimir Vissoultchev
Probably on PARSE_FLAG_ASM_FILE would be better to leave single dots as tok = '.' -- that is when next char is not IS_ID it will not become a symbol on its own. cheers, -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of Sergey

Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"

2016-04-18 Thread Vladimir Vissoultchev
> '#if PATHCMP==stricmp' doesn't do what you want anyway. The preprocessor == can't > compare strings, so the above is always true (because no matter if PATHCMP is > defined to stricmp or not defined it evaluates to zero, and as stricmp is no macro > it evaluates to zero as well). Btw, had

Re: [Tinycc-devel] First kcachegrind output

2016-04-18 Thread Vladimir Vissoultchev
Hi, This is a very intresting picture although I'm not sure what the numbers on it are exactly. Numbers in the cell must be the Include Percent (100ths of a %) -- time spent in the function. Numbers besides arrows look like they are the same as the number in the cell they point to. And then

Re: [Tinycc-devel] Preprocessor performance tuning

2016-04-17 Thread Vladimir Vissoultchev
Hi, Just comitted the patch to mob. Before that fixed the failing test and split the patch in two so that the allocators could easily be reversed if problems crop up. I also set up travis continuous integration so my dev (and mob) branch automatically reports on https://github.com/wqweto/tinycc

Re: [Tinycc-devel] Implementing gcc intrinsics

2016-04-16 Thread Vladimir Vissoultchev
> PS: please help to fix a current version of the exsymtab. There are some > changes in the current tcc which breaks Symtab streaming (asm_label) Well, this looks like a ginormous patch (close to 7k lines). I had browsed the exsymtab fork on github before (had plans to hoist its tests suite that

Re: [Tinycc-devel] Preprocessor performance tuning

2016-04-16 Thread Vladimir Vissoultchev
Wow, that's a lot of `TokenString` instances! You can try increasing `TOKSTR_TAL_SIZE` to 32MB. Then 256MB? When usage drops below 100% on Limit=128 allocator then you can start decreasing it, if you have to fine tune the capacity. cheers, -Original Message- From: Tinycc-devel

Re: [Tinycc-devel] Implementing gcc intrinsics

2016-04-16 Thread Vladimir Vissoultchev
tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of Michael Matz Sent: Thursday, April 14, 2016 3:54 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] Implementing gcc intrinsics Hi, On Fri, 8 Apr 2016, Vladimir Vissoultchev wrote: > How would you implement intrinsic functi

Re: [Tinycc-devel] Preprocessor performance tuning

2016-04-15 Thread Vladimir Vissoultchev
Ok, here is a new version of the patch that uses custom allocators for small instances of `TokenSym`, `CString` and `TokenString`. I'm getting at least 15% boost here (45MB/s -> 55MB/s) as the `malloc`/`free` calls get down to less that 1% of overall exec time in the profiler. This approach is

Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"

2016-04-15 Thread Vladimir Vissoultchev
> That won't help because strupr() is no standard C function, but > is specific to windows, so that define is the correct one to use. Ok, so the portable way is to loop the string and call `toupper` probably inside the #ifdef? cheers, ___

Re: [Tinycc-devel] .rept .endr for *.S. Any ideas?

2016-04-14 Thread Vladimir Vissoultchev
Take a look at `tcc_define_symbol` in `libtcc.c` -- `next` and friends are using the global `file` struct. cheers, -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of Sergey Korshunoff Sent: Thursday, April 14, 2016 6:39 PM To:

Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"

2016-04-14 Thread Vladimir Vissoultchev
> Which compiler are you used? > #if PATHCMP==stricmp >strupr(buf1); > #endif I'm using tinycc to compile this... Kidding :-)) Here it is: C:\Users\wqw>gcc --version gcc (i686-win32-dwarf-rev0, Built by MinGW-W64 project) 5.3.0 Although I'm debugging mostly in VS2015.

Re: [Tinycc-devel] Implementing gcc intrinsics

2016-04-14 Thread Vladimir Vissoultchev
> There is no optimizer that could benefit from inlining, the only > thing saved would be a call and return, which is a silly optimization. Unless the body of the function is single __asm__ instruction for instance. I was thinking about a simple C subset parser that produces AST of the inline if

Re: [Tinycc-devel] Compile .c file to .pyd

2016-04-13 Thread Vladimir Vissoultchev
Weird. I cannot find such error message in sources. There is "cannot find library 'lib%s'" in both tcc.c and libtcc.c cheers, -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+wqweto=gmail@nongnu.org] On Behalf Of Sergey Korshunoff Sent: Wednesday, April 13, 2016

Re: [Tinycc-devel] Implementing gcc intrinsics

2016-04-13 Thread Vladimir Vissoultchev
I can see that for inlines there is a separate `InlineFunc` struct that keeps function body until end of generation when in `gen_inline_functions` only the referenced inlines are generated as regular functions. The macro idea will be hard to impl as the inline body expansion will need separate

Re: [Tinycc-devel] revert of "Identifiers can start and/or contain"

2016-04-13 Thread Vladimir Vissoultchev
Nice catch! Sorry I missed the extra '.' in the original patch. Btw, I had some fixes for the last patches I sent to the list that I only pushed to my github branch. Will rebase on latest mob and push them directly. About `ppfp` being NULL, I saw most of the code has guards, obviously missed a

Re: [Tinycc-devel] More details when using tcc_set_error_func

2016-04-12 Thread Vladimir Vissoultchev
The format of the error messages is {file}:[{line}:] {severity}: {message} Line is optional as it is not always available, {file} can also be not available when the error is not a compilation one but error in supplied options for instance. Then {file} is replaced with "tcc" placeholder. Probably

Re: [Tinycc-devel] Attributes position on structs/unions

2016-04-07 Thread Vladimir Vissoultchev
Btw, current -dD option is not documented in tcc-doc.texi and I'm not sure how to proceed for the new -dM one. >From here https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html on -dCHARS > -dCHARS > CHARS is a sequence of one or more of the following characters, and must not > be

Re: [Tinycc-devel] Attributes position on structs/unions

2016-04-07 Thread Vladimir Vissoultchev
@nongnu.org] On Behalf Of Michael Matz Sent: Wednesday, April 6, 2016 10:12 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] Attributes position on structs/unions Hi, On Wed, 6 Apr 2016, Vladimir Vissoultchev wrote: > https://github.com/wqweto/tinycc/commit/0691b7630b89bf3de5f7691802c

[Tinycc-devel] Attributes position on structs/unions

2016-04-06 Thread Vladimir Vissoultchev
https://github.com/wqweto/tinycc/commit/0691b7630b89bf3de5f7691802cb923bd7c1 fd99 A small fix for compat w/ gcc which allows `attributes` both to prefix and postfix type declaration like this: typedef union Unaligned16a { uint16_t u; uint8_t b[2]; } __attribute__((packed))

Re: [Tinycc-devel] tccboot sources on github

2016-04-06 Thread Vladimir Vissoultchev
Awesome! Can you put a compiled .iso in repo's releases? I'm not sure I can compile it w/o hand-holding or a step-by-step readme. Probably not the only one who will need assistance on that. cheers, -Original Message- From: tinycc-devel-bounces+wqweto=gmail@nongnu.org

Re: [Tinycc-devel] GAS symbols

2016-04-04 Thread Vladimir Vissoultchev
This is weird. Could be the second table introduces some cache misses but probably someone else might chime in with better explanation and/or suggestion how to improve this. cheers, -Original Message- From: tinycc-devel-bounces+wqweto=gmail@nongnu.org

Re: [Tinycc-devel] GAS symbols

2016-04-04 Thread Vladimir Vissoultchev
> How to download only a diff form a github (my browser os quite old and don't > supported by github)? Can you post your diffs? I amended the original commit so the original link seems to be dead (it's not your browser). Try the new one at

Re: [Tinycc-devel] GAS symbols

2016-04-03 Thread Vladimir Vissoultchev
=gmail@nongnu.org] On Behalf Of Michael Matz Sent: Sunday, April 3, 2016 8:58 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] GAS symbols Hi, On Sun, 3 Apr 2016, Vladimir Vissoultchev wrote: > Here is the fix that switches off '.' for identifiers when parsing > #defines in .S

Re: [Tinycc-devel] GAS symbols

2016-04-03 Thread Vladimir Vissoultchev
Hi, Here is the fix that switches off '.' for identifiers when parsing #defines in .S files. https://github.com/wqweto/tinycc/commit/2ec8d7068aeed7b83c9d4f30aa686586182b 1c34 This includes an originally failing test with your SRC(y...) macro for regression testing. I have reset your [2bf43b5]

Re: [Tinycc-devel] GAS symbols

2016-03-31 Thread Vladimir Vissoultchev
> Another qiestion: what purpose of the following change? > > if (tok != TOK_STR) > expect("string constant"); > next(); > +if (tok == ',') { > +next(); > +if (tok == '@' || tok == '%') >

Re: [Tinycc-devel] GAS symbols

2016-03-30 Thread Vladimir Vissoultchev
The original problem with the '.' is GAS was that tcc couldn't deal with labels starting '.' like .start: <> .end: . . . and gcc -S seem to produce lots of these. Unfortunately there is no failing test for this yet implemented so your revert seems to pass all tests present. If you do

Re: [Tinycc-devel] GAS symbols

2016-03-29 Thread Vladimir Vissoultchev
Hi, Unfortunately the offending fix of mine causes 'y...' to be treated as a single identifier instead of y followed by TOK_DOTS which is gcc extension to designate 'y' to become __VA_ARGS__ replacement. Nasty! If going forward with the commit the plan is in tccpp.c around line 1337 (nice

Re: [Tinycc-devel] GAS symbols

2016-03-24 Thread Vladimir Vissoultchev
Sent: Thursday, March 24, 2016 5:04 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] GAS symbols Hi, On Thu, 17 Mar 2016, Vladimir Vissoultchev wrote: > About the TOK_DOTS saga -- yes, the original code was using PEEKC > canonically, I'm not sure about the unget hack it implemented

Re: [Tinycc-devel] GAS symbols

2016-03-19 Thread Vladimir Vissoultchev
On Behalf Of Michael Matz Sent: Wednesday, March 16, 2016 10:36 PM To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] GAS symbols Hi, welcome to TCC development :) On Mon, 14 Mar 2016, Vladimir Vissoultchev wrote: > > A symbol is one or more characters chosen from the set of all > >

Re: [Tinycc-devel] tcc(1) from current [mob] doesn't recognize "const" attribute suffix

2016-03-19 Thread Vladimir Vissoultchev
> - if ((ccp->cc_pass = urlp->url_pass).s != NULL) > + ccp->cc_pass = urlp->url_pass; > + if (ccp->cc_pass.s != NULL) > goto jleave; This must be have been fixed in mob (at some point) as I used to get "lvalue expected" with 0.9.25 on similar failing snippet #include typedef

[Tinycc-devel] GAS symbols

2016-03-14 Thread Vladimir Vissoultchev
Hi, I am trying to compile something very similar to `gcc -S` output (like in this question ) and noticed that TCC does not support labels starting with a dot ('.') Reading GAS documentation