From bp at ten15.org Tue Oct 12 16:18:36 2004 From: bp at ten15.org (Boris Popov) Date: Tue, 12 Oct 2004 07:18:36 -0700 (PDT) Subject: cvs commit: tendra/src/installers/80x86/common instr386.c Message-ID: <200410121418.i9CEIaT1083530@spill.ten15.org> bp 2004/10/12 07:18:36 PDT Modified files: src/installers/80x86/common instr386.c Log: Remove unrelated (I belive) use_pop_ass() invocation since in the ass_tag rvalue can be on the top of the stack and should be keept intact as allocated register. Without this change improper use of 'p' suffixed instructions caused underflow of floating point stack. Test case by: stefanf Revision Changes Path 1.13 +1 -3 tendra/src/installers/80x86/common/instr386.c From bp at ten15.org Tue Oct 12 16:32:07 2004 From: bp at ten15.org (Boris Popov) Date: Tue, 12 Oct 2004 07:32:07 -0700 (PDT) Subject: cvs commit: tendra/src/installers/80x86/common coder.h instr.c instr386.c Message-ID: <200410121432.i9CEW7U1083708@spill.ten15.org> bp 2004/10/12 07:32:07 PDT Modified files: src/installers/80x86/common coder.h instr.c instr386.c Log: Use symbolic constant for floating point stack instead of 0x10000. Revision Changes Path 1.8 +5 -0 tendra/src/installers/80x86/common/coder.h 1.8 +1 -1 tendra/src/installers/80x86/common/instr.c 1.14 +3 -3 tendra/src/installers/80x86/common/instr386.c From bp at ten15.org Tue Oct 12 16:56:38 2004 From: bp at ten15.org (Boris Popov) Date: Tue, 12 Oct 2004 07:56:38 -0700 (PDT) Subject: cvs commit: tendra/src/installers/80x86/common instr386.c Message-ID: <200410121456.i9CEucnp083950@spill.ten15.org> bp 2004/10/12 07:56:38 PDT Modified files: src/installers/80x86/common instr386.c Log: Replace more constant expressions with register masks by their symbolic equivalents. Reviewed by: md5 Revision Changes Path 1.15 +12 -12 tendra/src/installers/80x86/common/instr386.c From bp at ten15.org Sun Oct 17 05:17:01 2004 From: bp at ten15.org (Boris Popov) Date: Sat, 16 Oct 2004 20:17:01 -0700 (PDT) Subject: cvs commit: tendra/src/installers/80x86/common instr386.c Message-ID: <200410170317.i9H3H15N066447@spill.ten15.org> bp 2004/10/16 20:17:01 PDT Modified files: src/installers/80x86/common instr386.c Log: Improve in_reg() function by removing a lot of duplicated code. Reviewed by: md5 Revision Changes Path 1.16 +22 -31 tendra/src/installers/80x86/common/instr386.c From stefanf at ten15.org Sun Oct 17 23:38:55 2004 From: stefanf at ten15.org (Stefan Farfeleder) Date: Sun, 17 Oct 2004 14:38:55 -0700 (PDT) Subject: cvs commit: tendra/src/producers/common/utility catalog.err tendra/src/producers/common/construct allocate.c basetype.c class.c declare.c declare.h initialise.c tendra/src/producers/common c_class.alg Message-ID: <200410172138.i9HLcune033474@spill.ten15.org> stefanf 2004/10/17 14:38:55 PDT Modified files: src/producers/common/utility catalog.err src/producers/common/construct class.c basetype.c allocate.c declare.c declare.h initialise.c src/producers/common c_class.alg Log: Implement C99's flexible array members. It means that you are allowed to omit the size of an array member, provided it is the last member and there is at least one additional member. The size of such a struct is defined as the offset to the last member. The intended usage of this feature is to be able to allocate a struct that contains a dynamically sized array with just one allocation call. The pragma option "flex_array_member" controls whether flexible array members are allowed. There is one open issue with the current implementation. While you are not allowed to have an array of structs with flexible array members, there is no constraint which forbids to increment a pointer to such a struct object by one. Since the standard describes pointer arithmetics in terms of arrays, it seems reasonable that those expressions are undefined. Currently the pointer is incremented by the size of the struct, rounded up according to the installer's idea of its alignment requirements. This means that the expression (char *)(&a + 1) == (char *)&a + sizeof(a) isn't guaranteed to be true if a's type contains a flexible array member. Revision Changes Path 1.16 +1 -0 tendra/src/producers/common/c_class.alg 1.8 +12 -1 tendra/src/producers/common/construct/allocate.c 1.10 +8 -0 tendra/src/producers/common/construct/basetype.c 1.8 +2 -2 tendra/src/producers/common/construct/class.c 1.12 +77 -4 tendra/src/producers/common/construct/declare.c 1.7 +2 -1 tendra/src/producers/common/construct/declare.h 1.12 +6 -0 tendra/src/producers/common/construct/initialise.c 1.13 +36 -0 tendra/src/producers/common/utility/catalog.err From stefanf at ten15.org Sun Oct 17 23:39:47 2004 From: stefanf at ten15.org (Stefan Farfeleder) Date: Sun, 17 Oct 2004 14:39:47 -0700 (PDT) Subject: cvs commit: tendra/src/lib/startup/Modes Xc99 Message-ID: <200410172139.i9HLdlop033507@spill.ten15.org> stefanf 2004/10/17 14:39:47 PDT Modified files: src/lib/startup/Modes Xc99 Log: Enable flexible array members in the C99 environment. Revision Changes Path 1.18 +2 -0 tendra/src/lib/startup/Modes/Xc99 From stefanf at ten15.org Mon Oct 18 09:24:57 2004 From: stefanf at ten15.org (Stefan Farfeleder) Date: Mon, 18 Oct 2004 00:24:57 -0700 (PDT) Subject: cvs commit: doc/en/changes article.sgml Message-ID: <200410180724.i9I7Owt4068175@spill.ten15.org> stefanf 2004/10/18 00:24:57 PDT Modified files: en/changes article.sgml Log: Add an update for the implementation of flexible arrays members. Revision Changes Path 1.7 +5 -0 doc/en/changes/article.sgml