Re: [Tinycc-devel] State of the tcc project
Le dimanche 01 juin 2014, 00:04:27 mobi phil a écrit : Why tinyCC didn't use a hierarchical code review, with people who follows the project and have a good overview (Thomas Preud'homme, grischka, Daniel Glöckner for ARM) ? Thanks, I also got dizzy by those useless patches. Also got lost if the patches related to global variables were/are going to be integrated? What patch related to global variables? What was it about? Best regards, Thomas signature.asc Description: This is a digitally signed message part. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
Hi, On Sun, 22 Jun 2014, David Mertens wrote: Sorry, I decided to give more than 20 hours for folks to weigh in, and then time got away from me. I'll revert jiang's changes with a push some time around June 23 (tomorrow), 9:00PM New York time. By the way, if the instructions at http://repo.or.cz/w/tinycc.git are supposed to be the community rules, jiang was not really breaking any. We should probably work with a different approach. I suggest that individuals who have ideas should do the following: 1) Discuss bug reports or feature requests on the mailing list. 2) If individuals on the mailing list agree that the idea is a good one, the individual should publish their work on a public git hosting site and submit a pull request on the mailing list. 3) After somebody with commit access has checked it out, they can pull it into the official release branch. That would mean closing the mob branch (otherwise everybody has commit access :) ). FWIW, I'd have never touched the x86-64 backend in TCC at all if it weren't for mob. I think overall the mob branch worked reasonably well until recently, and I'd hate to see it thrown out because of people having a different notion of reasonable behaviour :-/ Unfortunately I have no good alternative suggestion, though :-( Ciao, Michael.___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
Hi, Mob is mob. And there is master there. By the way, if the instructions at http://repo.or.cz/w/tinycc.git are supposed to be the community rules, jiang was not really breaking any. We should probably work with a different approach. I suggest that individuals who have ideas should do the following: That would mean closing the mob branch (otherwise everybody has commit access :) ). until recently, and I'd hate to see it thrown out because of people having a different notion of reasonable behaviour :-/ People listens to others could learn and contribute. Things could have advantages and disadvantages. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
Sorry, I decided to give more than 20 hours for folks to weigh in, and then time got away from me. I'll revert jiang's changes with a push some time around June 23 (tomorrow), 9:00PM New York time. By the way, if the instructions at http://repo.or.cz/w/tinycc.git are supposed to be the community rules, jiang was not really breaking any. We should probably work with a different approach. I suggest that individuals who have ideas should do the following: 1) Discuss bug reports or feature requests on the mailing list. 2) If individuals on the mailing list agree that the idea is a good one, the individual should publish their work on a public git hosting site and submit a pull request on the mailing list. 3) After somebody with commit access has checked it out, they can pull it into the official release branch. Thoughts? How do we change the instructions for the readme on repo.or.cz? David On Wed, Jun 18, 2014 at 2:31 PM, grischka gris...@gmx.de wrote: David Mertens wrote: And now lifenjoiner has jumped in, adding patches without discussion. Can we forcibly revert tcc's mob branch at http://repo.or.cz/ back to grishka's commit from 4-17 and cherry pick grishka's and Thomas' commits that were made thereafter? This will cause confusion for anybody who has pulled since mid-April, but will help ensure that tcc has higher quality commits. I can work on this tomorrow if others think this is a good idea. David I'd vote for the same result but to keep the history (i.e. push one commit to revert the whole series). We could keep the warnings, or some, maybe. Some comments would be nice, maybe. Here is what I found: jiangAdd warning 4 http://repo.or.cz/w/tinycc.git/commitdiff/5d0785d0e1d71860b61b1c365ff46c 8e399ad0e6 - bad name for global variable 'is_force' - force what? - needs checking but might be ok. jiangDelete a = (a = 0)? A: -a; \ http://repo.or.cz/w/tinycc.git/commitdiff/3d608d4b54edfdd9f394f06d2be074 1387ac733a - causes regression (win32) jiangint main() http://repo.or.cz/w/tinycc.git/commitdiff/e5e7f488e22190f893152c0b2f73e9 ba499c4169 - causes regression. Test case: struct { unsigned a:9, b:7, c:5; } s; s.a = s.b = s.c = 3; printf(%d / %d / %d\n, s.a, s.b, s.c); -- 219 / 91 / 3 jiangLet init_putz one-time generation http://repo.or.cz/w/tinycc.git/commitdiff/d316836008f4738d5a020b28aa33e9 6a82a81aca - may crash the compiler (see gcc warning) - too risky, anyway jiangrestore 2dd8587c2f32d17a2cd0443a60a614a3fa9bbe29 http://repo.or.cz/w/tinycc.git/commitdiff/c6345b5a8af36d5577307860644010 b1528257d3 - obviously mixed features without any description - far from good implementations jiangWhen tcc.exe update, abitest-tcc.exe not updated. For... http://repo.or.cz/w/tinycc.git/commitdiff/5a514107c420bd8dd724c27d1e7e90 5571a6aba5 - valid concern but sloppy solution (should force the build of abitest-tcc.exe) --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel -- Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian Kernighan ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project (jiang)
Hi, On Behalf Of jiang index 22a8278..2fd4614 100644 @@ -1655,6 +1655,15 @@ void bitfield_test(void) else printf(st1.f2 != -1\n); +/* XXX: gcc bug My logic is: If it is a bug, why we should follow a wrong way? Aidan Dodds wrote: It looks like you are trying to reproduce a gcc bug, --- I agree. +st1.f1 = st1.f2 = st1.f3 = st1.f4 = st1.f5 = 3; +printf(%d %d %d %d %d\n, + st1.f1, st1.f2, st1.f3, st1.f4, st1.f5); +*/ +st1.f2 = st1.f3 = st1.f4 = st1.f5 = 3; +printf(%d %d %d %d %d\n, + st1.f2, st1.f3, st1.f4, st1.f5); + /* bit sizes below must be bigger than 32 since GCC doesn't allow long-long bitfields whose size is not bigger than int */ struct sbf2 { ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project (jiang)
jiang wrote: /* bitfield store handling */ +SValue tmp; +tmp = vtop[0]; [...] +vtop--; +vpushv(tmp); This is still not a solution. See #include stdio.h int main(int argc, char **argv) { struct { unsigned a:9, b:5, c:7; } _s, *s = _s; int n = 250; s-a = s-b = s-c = n + 4; printf(-- %d / %d / %d\n, s-a, s-b, s-c); return 0; } -- 432 / 16 / 126 gcc msvc: -- 30 / 30 / 126 tcc release_0_9_26 -- 254 / 30 / 126 FWIW, the line above is the reason why I'm trying to investigate this. Let's see if Mr. jiang can come up with something useful (and how long it will take). -- gr ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] State of the tcc project (jiang)
This is my modified. I tried to modify the Makefile, but my limited level, think of ways to modify later. --- tccgen.c --- index 7906ccf..4f2a02c 100644 @@ -2562,6 +2562,8 @@ ST_FUNC void vstore(void) /* leave source on stack */ } else if (ft VT_BITFIELD) { /* bitfield store handling */ +SValue tmp; +tmp = vtop[0]; bit_pos = (ft VT_STRUCT_SHIFT) 0x3f; bit_size = (ft (VT_STRUCT_SHIFT + 6)) 0x3f; /* remove bit field info to avoid loops */ @@ -2598,6 +2600,8 @@ ST_FUNC void vstore(void) gen_op('|'); /* store result */ vstore(); +vtop--; +vpushv(tmp); } else { #ifdef CONFIG_TCC_BCHECK /* bound check case */ index 22a8278..2fd4614 100644 @@ -1655,6 +1655,15 @@ void bitfield_test(void) else printf(st1.f2 != -1\n); +/* XXX: gcc bug +st1.f1 = st1.f2 = st1.f3 = st1.f4 = st1.f5 = 3; +printf(%d %d %d %d %d\n, + st1.f1, st1.f2, st1.f3, st1.f4, st1.f5); +*/ +st1.f2 = st1.f3 = st1.f4 = st1.f5 = 3; +printf(%d %d %d %d %d\n, + st1.f2, st1.f3, st1.f4, st1.f5); + /* bit sizes below must be bigger than 32 since GCC doesn't allow long-long bitfields whose size is not bigger than int */ struct sbf2 { ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project (jiang)
On 20/06/2014 06:58, jiang wrote: printf(%d %d %d %d %d\n, + st1.f2, st1.f3, st1.f4, st1.f5); Am i being stupid, or do you specify 5 format specifiers with only 4 arguments?! ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project (jiang)
I see now that must be intentional, but that's also very dangerous. It looks like you are trying to reproduce a gcc bug, why not make that optional? Perhaps proposing a compatibility mode if it would be a useful thing to have. Even if its sensible, you should really control what garbage data you are throwing out from that format specifier. Why not generate a random value to Emmit? That would seem safer for a large number of reasons. I should point out I don't know what problem you are trying to solve, this just strikes me as very dodgy code, especially when it seems you are purposefully break working code, to implement a bug. That surely effects everyone using tcc. On 20/06/2014 11:08, Aidan Dodds wrote: On 20/06/2014 06:58, jiang wrote: printf(%d %d %d %d %d\n, + st1.f2, st1.f3, st1.f4, st1.f5); Am i being stupid, or do you specify 5 format specifiers with only 4 arguments?! ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
And now lifenjoiner has jumped in, adding patches without discussion. Can we forcibly revert tcc's mob branch at http://repo.or.cz/ back to grishka's commit from 4-17 and cherry pick grishka's and Thomas' commits that were made thereafter? This will cause confusion for anybody who has pulled since mid-April, but will help ensure that tcc has higher quality commits. I can work on this tomorrow if others think this is a good idea. David On Sat, May 31, 2014 at 6:04 PM, mobi phil m...@mobiphil.com wrote: Why tinyCC didn't use a hierarchical code review, with people who follows the project and have a good overview (Thomas Preud'homme, grischka, Daniel Glöckner for ARM) ? Thanks, I also got dizzy by those useless patches. Also got lost if the patches related to global variables were/are going to be integrated? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel -- Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian Kernighan ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
jiangint main() http://repo.or.cz/w/tinycc.git/commitdiff/e5e7f488e22190f893152c0b2f73e9ba499c4169 - causes regression. Test case: struct { unsigned a:9, b:7, c:5; } s; s.a = s.b = s.c = 3; printf(%d / %d / %d\n, s.a, s.b, s.c); -- 219 / 91 / 3 index fcd1b8c..0451d9f 100644 --- a/tccgen.c +++ b/tccgen.c @@ -2690,6 +2690,8 @@ void vstore(void) } /* leave source on stack */ } else if (ft VT_BITFIELD) { +SValue tmp; +tmp = vtop[-1]; /* bitfield store handling */ bit_pos = (ft VT_STRUCT_SHIFT) 0x3f; bit_size = (ft (VT_STRUCT_SHIFT + 6)) 0x3f; @@ -2727,6 +2729,7 @@ void vstore(void) gen_op('|'); /* store result */ vstore(); +vtop[0] = tmp; } else { #ifdef CONFIG_TCC_BCHECK /* bound check case */ Thank you, tell me bug This patch can solve the problem jiang@jiang:~/test$ ./tcct -run c3.c 3 / 3 / 3 jiangrestore 2dd8587c2f32d17a2cd0443a60a614a3fa9bbe29 http://repo.or.cz/w/tinycc.git/commitdiff/c6345b5a8af36d5577307860644010b1528257d3 - obviously mixed features without any description - far from good implementations To add compiler directives, did not write clearly jiang ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
I was on a month to join tinycc-devel. There are many rules I do not know, git commands also miss a beat, causing some useless patch, I hope you forgive me! jiang I also got dizzy by those useless patches. Also got lost if the patches related to global variables were/are going to be integrated? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
Why tinyCC didn't use a hierarchical code review, with people who follows the project and have a good overview (Thomas Preud'homme, grischka, Daniel Glöckner for ARM) ? Thanks, I also got dizzy by those useless patches. Also got lost if the patches related to global variables were/are going to be integrated? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
I follow your advice, has established an account at github. But you can not call Thomas Preud'homme, grischka, Daniel Glöckner, who came back, they did not push the dozens of days! I feel I contribute nobody seriously. I need them to show me the error. jiang ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
The troll alarm went off really hard. I would never trust this guys patches, but, hey, that's just me... hopefully the breaking patches are moved to another repo so that I can more easily ignore any pull requests :) Anyone else working on TCC right now? -Sia On Thu, May 29, 2014 at 3:14 PM, jiang 30155...@qq.com wrote: Hello everyone! My English is not very good! I very much hope to work together with you. I want God to guarantee, I push is not low quality code ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
Sia Lang wrote: The troll alarm went off really hard. I would never trust this guys patches, but, hey, that's just me... hopefully the breaking patches are moved to another repo so that I can more easily ignore any pull requests :) Anyone else working on TCC right now? -Sia I think to be fair we cannot reject the entire series. So which patches would you like to trust and/or which ones would you prefer not to have? Place your vote (everybody). --- grischka ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] State of the tcc project
Hello everyone! My English is not very good! I very much hope to work together with you. I want God to guarantee, I push is not low quality code ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] State of the tcc project
Hey jiang, The simplest way to ensure that you don't push low-quality code is to work with your own repository, for example, on github. When you think you have something you would like to contribute, then email this list and ask for a review. Provide a link to your hosted repo and explain what you accomplish with your work. Hopefully one or two folks here will look over your work and give you some feedback. Once they approve your work, then you can push to mob. Hope that helps. David On Thu, May 29, 2014 at 9:14 AM, jiang 30155...@qq.com wrote: Hello everyone! My English is not very good! I very much hope to work together with you. I want God to guarantee, I push is not low quality code ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel -- Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian Kernighan ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] State of the tcc project
We've come to depend on TCC as an embedded C compiler and are quite frankly a bit discouraged by the latest developments. The home page says bellard is no longer working on tcc, but there is fortunately some traffic in the git repo However, I have a couple of concerns: 1. Lately, a large amount of very low quality patches from jiang has been pushed. Are these being reviewed and maybe even reverted? 2. Is there someone in charge of releasing new versions? I'd like to help with testing and releasing, if needed. 3. Should there be an official home page set up for tinyc, maybe at github, to track issues and review code and provide up-to-date documentation? By official, I assume mr Bellard has to give thumbs up for it to be legit? TinyC is an awesome project, and I hope it stays that way :) Thanks! -Sia ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] State of the tcc project
( a large amount of very low quality patches from jiang has been pushed) say to you very low quality patch I protest!!! Jiang ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel