Commit Graph

43470 Commits

Author SHA1 Message Date
sergei
e7cd5319f0 * Put under {$ifndef x86_64} more cases of instructions that do not exist in 64-bit mode.
git-svn-id: trunk@27933 -
2014-06-11 12:51:38 +00:00
sergei
c28271ab99 * NASM writer: don't force 'near' size for all non-far branches and calls, it disables NASM's capability to optimize branches into short form where possible, and thus only increases size of generated code.
- LDS and LES instructions do not exist on x86_64.

git-svn-id: trunk@27932 -
2014-06-11 12:32:21 +00:00
michael
07626f029a * Fixed bug ID #26137 (script stops on empty statement)
git-svn-id: trunk@27931 -
2014-06-11 06:39:18 +00:00
sergei
b594eee70b * Moved x86_64 mod/div code to x86, with minimal changes to ensure it compiles on i386/i8086. Merging optimized division-by-const code from i386 is pending...
git-svn-id: trunk@27930 -
2014-06-11 01:42:46 +00:00
masta
0cb1a129b3 {ARM} Implement usage of generic division-by-const optimization
This utilizes the code commited in r27904 to convert a division by const
into a 32x32->64 bit multiplication for ARM.

git-svn-id: trunk@27929 -
2014-06-10 20:49:18 +00:00
Jonas Maebe
145e9c1aae * don't generate debug info for class fields in generic types
-> fixes failed compilation of webtbs/25600 with debug info
      (broken since 6 June, possibly because of r27874)
  * don't allocate class fields defined in generic types, as the
    only reason for this was to have valid debug info

git-svn-id: trunk@27928 -
2014-06-10 19:05:10 +00:00
Jonas Maebe
e5647d5118 * fixed test on 64 bit platforms
git-svn-id: trunk@27927 -
2014-06-10 19:05:08 +00:00
Jeppe Johansen
96b73b0076 Fixed generation of abs calls for thumb and thumb-2 targets.
git-svn-id: trunk@27926 -
2014-06-10 17:48:09 +00:00
reiniero
e9f99fb3d2 * fcl-db: bufdataset: free up cached blob buffers in unidirectional mode; alternate solution to issue #24509. Patch by Laco.
git-svn-id: trunk@27925 -
2014-06-10 11:56:24 +00:00
reiniero
95a1a2552c * fcl-db: cosmetic
git-svn-id: trunk@27924 -
2014-06-10 10:34:56 +00:00
reiniero
81548f0e9c * fcl-db: sql parser:
- fix parsing scripts containing SET AUTODDL and SET TERM statements
- SET TERM/SET AUTODDL will be output as SQL comments when regenerating SQL so thethe commands work with e.g. sqldb

git-svn-id: trunk@27923 -
2014-06-10 10:01:22 +00:00
Károly Balogh
1b11541c90 m68k: simplification and cleanup of g_proc_entry. the generated code shouldn't change
git-svn-id: trunk@27922 -
2014-06-10 09:15:26 +00:00
reiniero
0782f4f853 * fcl-db: sql parser:
- support reading (and ignoring) SET AUTODDL statements generated by isql.
  This allows the parser to read isql-generated metadata extraction scripts from Firebird databases
- tests

git-svn-id: trunk@27921 -
2014-06-10 08:47:56 +00:00
lacak
041b4681e9 fcl-db: sqldb: cosmetic
git-svn-id: trunk@27920 -
2014-06-10 08:45:53 +00:00
lacak
5c936f0ecf fcl-db: sqldb: always call in TSQLQuery.InternalOpen BindFields so all private variables are calculated properly (f.e. FBlobFieldCount)
git-svn-id: trunk@27919 -
2014-06-10 08:41:06 +00:00
reiniero
ff28acbaad * fcl-db: sql parser:
- support for variables in array access (e.g. myarray[:localvar] as happens in stored procs)
- rename TSQLSymbolLiteral to TSQLSymbolString to avoid confusion between enum and the TSQL*Literal classes
- Noted to do: array access via variables results in ElementIndex not being set. Need to verify what impact (if any) this has

git-svn-id: trunk@27918 -
2014-06-10 07:30:13 +00:00
reiniero
a2ce52963a * fcl-db: sql parser tests: correct SET TERM/CREATE PROCEDURE tests
- One test currently fails indicating the need for more support for variables in select statements

git-svn-id: trunk@27917 -
2014-06-10 06:39:00 +00:00
reiniero
575a082272 * fcl-db: fix set terminator tests when run within suite/all tests instead of single test
git-svn-id: trunk@27916 -
2014-06-10 05:51:51 +00:00
reiniero
ebb2f38e08 * fcl-db: sql parser:
- simplify code, thanks Michael & Laco. 
  - Tests for STARTING WITH
  - Work in progress on SET TERM+CREATE PROCEDURE test

git-svn-id: trunk@27915 -
2014-06-10 05:27:56 +00:00
reiniero
c7a045af49 * fcl-db: sql parser: basic set term/create procedure test
git-svn-id: trunk@27914 -
2014-06-09 13:09:04 +00:00
reiniero
37e44f52eb * fcl-db:: sql parser: deal with table.column notation introduced in previous commit
git-svn-id: trunk@27913 -
2014-06-09 12:52:38 +00:00
reiniero
c63b31c839 * fcl-db: sql parser: support table.column notation for fields like
- SELECT A.B FROM A
- SELECT B FROM A ORDER BY C.D
- tests
Note: failing test due to needed implementation of parsing table.field into table and field references

git-svn-id: trunk@27912 -
2014-06-09 12:34:52 +00:00
reiniero
a99919a4bc * fcl-db: bufdataset: effectively revert r27830 due to side effects. See bug #24509
git-svn-id: trunk@27911 -
2014-06-09 09:26:23 +00:00
reiniero
125845fe52 * fcl-db: sql parser/generator:
- Correct OUTER join: there is no separate OUTER JOIN; the syntax is FULL JOIN or FULL OUTER JOIN
- Support for optional OUTER in LEFT OUTER and RIGHT OUTER JOIN

git-svn-id: trunk@27910 -
2014-06-09 09:21:44 +00:00
reiniero
13146211ce * fcl-db: sql parser tests: run all tests by default in Lazarus project
git-svn-id: trunk@27909 -
2014-06-09 08:10:44 +00:00
reiniero
1e21d66b89 * fcl-db: sql parser tests:
- cosmetic changes (capitalization, comments)
- add tests for SET TERM, symbol literal parsing introduced in r27907
- Lazarus test project: default+debug build mode: no optimalization, more checks enabled

git-svn-id: trunk@27908 -
2014-06-09 08:01:20 +00:00
reiniero
75169f7a2b + fcl-db: sql parser:
- add support for Firebird SET TERM statements (changing SQL statement terminator)
- fix sigsegv (e.g. running TTestCheckParser.TestNotBetween)

git-svn-id: trunk@27907 -
2014-06-09 07:54:13 +00:00
michael
e699c6948f * Patch from Laco to update to version 9 of postgres headers (bug ID 26314)
git-svn-id: trunk@27906 -
2014-06-09 07:35:56 +00:00
michael
5ca66a14fa * Applied corrected patch from 26307
git-svn-id: trunk@27905 -
2014-06-09 07:30:12 +00:00
sergei
cd27d64cd5 + Support (as target-independent as possible) optimization of division by constants:
The code generator gets two new methods, a_mul_reg_reg_pair and g_div_const_reg_reg. The first one is basically 32x32 to 64 bits multiplication (or any other size, with result having twice the size of arguments), which must be implemented for every target. The second one actually does the job, its default implementation taken from powerpc64 and is sufficiently good for all three-address targets.

+ Enabled optimized division for MIPS target, target-specific changes are under 30 lines.

git-svn-id: trunk@27904 -
2014-06-08 22:50:24 +00:00
nickysn
73d7f2aa18 * let the compiler generate the stack segment in i8086 near data memory models
as well. Even though, in these models, the stack is dynamically allocated
  (because it goes on top of the heap, but the heap is variable size), there are
  still benefits:
  1) the program will run on a larger stack during initialization, before the
     actual stack (and heap) are ready
  2) in cases, when the system is extremely low on memory, DOS will reject to
     load the program if there's not enough memory for the stack the program
     requires. This way the startup code can be further simplified by omitting
     the 'not enough memory' check in the future (when we add the minimum heap
     size to the executable reserved space as well).

git-svn-id: trunk@27903 -
2014-06-08 21:14:57 +00:00
svenbarth
81c7b22199 Mantis #25236 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27902 -
2014-06-08 15:51:33 +00:00
svenbarth
45e2e91536 Mantis #22468 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27901 -
2014-06-08 15:47:13 +00:00
svenbarth
60ef0a61bc Mantis #22792 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27900 -
2014-06-08 15:43:46 +00:00
sergei
ed46a07f62 * Using x86-specific capability of shifting with carry flag helps to reduce amount of instructions.
git-svn-id: trunk@27899 -
2014-06-08 14:01:41 +00:00
svenbarth
1ebff1a963 Mantis #21622 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27898 -
2014-06-08 11:38:24 +00:00
svenbarth
8b290f4cb2 Mantis #24690 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27897 -
2014-06-08 11:34:32 +00:00
svenbarth
47407d2d7a Mantis #23279 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27896 -
2014-06-08 11:26:44 +00:00
svenbarth
1a22175553 Mantis #23653 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27895 -
2014-06-08 11:23:31 +00:00
svenbarth
69a8445472 Mantis #22790 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27894 -
2014-06-08 11:18:04 +00:00
svenbarth
c1fdce5166 Mantis #22540 was fixed by partial specializations addition in revision 27861
+ added test

git-svn-id: trunk@27893 -
2014-06-08 11:12:03 +00:00
sergei
ae627a4ba8 * tcgx86.a_op_const_reg_reg: optimize trivial cases before considering more complex ones.
git-svn-id: trunk@27892 -
2014-06-08 00:08:56 +00:00
sergei
c184d9740c + Implemented target-independent optimization of signed "mod 2**N" as
"sign:=left sar sizeof(left)*8-1; result:=(((left xor sign)-sign) and 2**N-1) xor sign)-sign;"
  This solution yields larger code than one suggested by Mantis #21152, however its speed on i386 is approximately the same, and it is also suitable for all operand sizes, all powers of two and all targets.

git-svn-id: trunk@27891 -
2014-06-07 22:19:10 +00:00
reiniero
da91ac9726 * fcl-db: sql parser: correct hex error message
git-svn-id: trunk@27890 -
2014-06-07 10:32:06 +00:00
reiniero
dcdfa2f307 * fcl-db: cosmetic
git-svn-id: trunk@27889 -
2014-06-07 10:11:35 +00:00
reiniero
614bc64200 * fcl-db: sql parser:
- fix for double precision followed by other subclauses (e.g. DEFAULT)
- of course, associated test

git-svn-id: trunk@27888 -
2014-06-07 09:55:15 +00:00
reiniero
e1d9a068c0 * fcl-db: sql parser: Allow:
- double precision datatype
- blob subtype text and blob subtype binary (instead of only blob subtype 0 and 1)
- Associated tests

git-svn-id: trunk@27887 -
2014-06-07 09:31:12 +00:00
reiniero
9898474fa7 * fcl-db: sql parser: fix for test case r27868,27885
git-svn-id: trunk@27886 -
2014-06-07 08:13:15 +00:00
reiniero
050be49b16 * fcl-db: correct test committed in r27868
git-svn-id: trunk@27885 -
2014-06-07 08:10:52 +00:00
sergei
92cf25b9a5 * Reworked i386 division by constant optimization to reuse code from powerpc64. The algorithm is slightly different, signed version is one instruction shorter, unsigned one is one instruction longer (typically). The new algorithm is easily scalable for x86_64 target, unlike the old one.
git-svn-id: trunk@27884 -
2014-06-07 00:20:05 +00:00