Jonas Maebe
5ef93e85b8
+ added extra "orgsupreg" parameter to do_spill_read/do_spill_written/
...
do_spill_replace routines, will be necessary by llvm register
allocator to determine the tdef corresponding to that register
* replaced uses of taicpu with tai_cpu_abstract_sym in the register
allocator so that it can work both with taicpu and taillvm instructions
git-svn-id: branches/hlcgllvm@26043 -
2013-11-11 11:15:43 +00:00
Jonas Maebe
5599870a4e
* moved the register colouring and spill temp allocation to a virtual method,
...
and made the related data structures protected instead of private, so they
can be overridden
git-svn-id: branches/hlcgllvm@26042 -
2013-11-11 11:15:38 +00:00
Jonas Maebe
d13b510144
+ helpers to convert tdefs to strings describing the types in llvm syntax.
...
Other than arrays and complex procvardefs, all aggregates are currently
handled as opaque arrays of bytes
o special case: s80real (x87 extended type) is encoded as "array[0..9] of
byte" inside arrays, because when using the llvm type describing
"extended" llvm will handle it in an ABI-compliant way (allocating e.g.
16 bytes for it on Darwin and x86-64 platforms). Loading/storing them
always happens using instructions that only read/write 10 bytes, so
we only have to take care to convert them to the actual extended type
when indexing arrays/subscripting records (when records are no longer
handled in an opaque way)
git-svn-id: branches/hlcgllvm@26041 -
2013-11-11 11:15:35 +00:00
Jonas Maebe
8ede313ba1
+ llvm parameter manager: it reuses the native parameter manager to create
...
the paraloc information, and then adds llvm-specific information to the
paralocs
o only partially implemented, in particular function result handling is
not yet there
git-svn-id: branches/hlcgllvm@26040 -
2013-11-11 11:15:31 +00:00
Jonas Maebe
99de108c68
* renamed all paramanagers to tcpuparamanager so the llvm paramanager can
...
derive from them without ifdefs
git-svn-id: branches/hlcgllvm@26039 -
2013-11-11 11:15:27 +00:00
Jonas Maebe
d245228ba6
+ tcgllvm.a_label() and tcgllvm.a_jmp_always(). Special for llvm: every
...
basic block must end with a terminator instruciton (such as a branch) ->
when emitting a label, check whether the previous instruction is a
terminator instruction and if not, add an unconditional branch to the
label we are adding.
o Implemented at the tcg instead of at the thlcgobj level because
a) these methods don't need any high level type information
b) implementing them in thlcgobj would require making thlcg.a_label()
virtual and ensuring that no-one ever calls cg.a_label() in any
generic code
git-svn-id: branches/hlcgllvm@26038 -
2013-11-11 11:15:20 +00:00
Jonas Maebe
7db9d4c7e9
+ basic tcg unit for llvm: initialise register allocators and getint
...
fpuregister overloads that ignore subregisters (everything is
handled via tdef at the thlcgobj level)
git-svn-id: branches/hlcgllvm@26037 -
2013-11-11 11:15:16 +00:00
Jonas Maebe
3296984bd9
+ classes for llvm instructions (ait_llvmins), procedure definitions
...
(ait_llvmprocdef), global variable definitions (ait_llvmvarsym)
and alias definitions (ait_llvmalias)
git-svn-id: branches/hlcgllvm@26036 -
2013-11-11 11:15:13 +00:00
Jonas Maebe
44b1996158
+ base units for llvm:
...
o opcodes + string representation
o llvm string representations of targets supported by fpc
o supported fpc optimisations
o list of supported LLVM versions (currently only targeting 3.3)
git-svn-id: branches/hlcgllvm@26035 -
2013-11-11 11:15:09 +00:00
Jonas Maebe
967354bb4c
* corrected def used for loads of the address of pass-by-reference
...
parameters
git-svn-id: branches/hlcgllvm@26034 -
2013-11-11 11:15:05 +00:00
Jonas Maebe
1df3039424
+ LLVM temp allocator based on new R_TEMPREGISTER register class. For every
...
temp we allocate, we set the base register to a newly allocated
R_TEMPREGISTER. This allows for uniquely identifying a temp even if its
offset is modified.
git-svn-id: branches/hlcgllvm@26033 -
2013-11-11 11:14:59 +00:00
Jonas Maebe
9573160c1a
+ llvmdatalayout field for tsysteminfo that contains the encoded data layout
...
as used by llvm for most targets (taken from clang, adapted in some cases
where we use a custom stack alignment)
git-svn-id: branches/hlcgllvm@26032 -
2013-11-11 11:14:55 +00:00
Jonas Maebe
6426180438
* mangled names (generated for global symbols) start with an '@' for llvm
...
git-svn-id: branches/hlcgllvm@26031 -
2013-11-11 11:14:50 +00:00
Jonas Maebe
b47cc22d66
* separated JVM-specific subscripting code in virtual method
...
git-svn-id: branches/hlcgllvm@26030 -
2013-11-11 11:14:47 +00:00
Jonas Maebe
9e6764e443
* converted program termination to compilerproc/hlcg
...
git-svn-id: branches/hlcgllvm@26029 -
2013-11-11 11:14:43 +00:00
Jonas Maebe
cd92791d09
* converted unit initialization to compilerproc/hlcg
...
git-svn-id: branches/hlcgllvm@26028 -
2013-11-11 11:14:38 +00:00
Jonas Maebe
9c97f10d57
* branch for (new) llvm backend based on the high level code generator
...
infrastructure
git-svn-id: branches/hlcgllvm@26027 -
2013-11-11 10:52:07 +00:00
sergei
437b3755d1
* math.hypot(): factor larger argument out of expression in order to avoid loss of precision.
...
git-svn-id: trunk@26026 -
2013-11-11 09:56:20 +00:00
lacak
aa147703d5
fcl-db: memds: when FieldDefs are changed set TableIsCreated to false to signal, that CreteTable should be called.
...
+ Add test unit for TMemDataset to allow test specific properties/methods of TMemDataset
+ Add this unit to test frameworks
git-svn-id: trunk@26025 -
2013-11-11 09:14:21 +00:00
Jonas Maebe
8d1fb0ee1c
* added a safety check to gen_load_cgpara_loc()
...
git-svn-id: trunk@26024 -
2013-11-10 23:27:05 +00:00
Jonas Maebe
8a0caea0c0
+ override g_save_registers() and g_restore_registers() with do-nothing versions
...
for high level code generator targets
git-svn-id: trunk@26023 -
2013-11-10 21:33:38 +00:00
Jonas Maebe
1b6e4e572f
- removed duplicate thlcg2ll a_label method (it's declared the same in
...
thlcgobj and not virtual in either class)
git-svn-id: trunk@26022 -
2013-11-10 21:32:39 +00:00
Jonas Maebe
8cdde466bb
* include fpcdefs.inc
...
git-svn-id: trunk@26021 -
2013-11-10 21:30:55 +00:00
Jonas Maebe
62e1df9e76
* fixed indentation
...
git-svn-id: trunk@26020 -
2013-11-10 21:25:34 +00:00
Jonas Maebe
c1cec52897
* fixed alignment of bitpacked arrays of ordinals/enums: the prevous code
...
always returned the alignment of enum/ordinal by itself, which could be
either bigger or smaller than what was required
* for non-bitpacked regular arrays, always use the alignment of the elements
instead of sometimes the natural alignment of the size of the elements
(which can be different)
git-svn-id: trunk@26019 -
2013-11-10 21:22:28 +00:00
nickysn
dea947f87b
* fixed tcgx86.a_op_const_ref for shl/shr/sar/rol/ror on i8086 and x86_64
...
git-svn-id: trunk@26018 -
2013-11-10 20:39:47 +00:00
florian
412dc6586f
* the writestr helper initializes the target string, so mark it as being written
...
before the call to the helper to get proper life information
git-svn-id: trunk@26017 -
2013-11-10 20:20:40 +00:00
florian
8be7cfa05f
* check the scope of a variable when checking dfa based uninitialized variables,
...
dfa is procedure local only so consider only variables of the current scope
git-svn-id: trunk@26016 -
2013-11-10 20:20:38 +00:00
florian
57586b69c7
* implicit try...finally frames are added after dfa so we don't have to take care if the subroutine needs/uses those or not
...
git-svn-id: trunk@26015 -
2013-11-10 20:20:36 +00:00
florian
3cb747f4a7
* mark the node which is the entry of the user code with a flag
...
* check for uninitialized variables at the node which is marked as the start of the user code
git-svn-id: trunk@26014 -
2013-11-10 20:20:27 +00:00
nickysn
870d432468
+ reenabled the new str<->float conversion code on i8086 after the fix in r26005
...
git-svn-id: trunk@26013 -
2013-11-10 18:29:17 +00:00
florian
24d88edf37
* fixes arm building after 26004
...
git-svn-id: trunk@26012 -
2013-11-10 17:46:03 +00:00
Jonas Maebe
f348e89112
- removed too early assignment of have_first_symbol:=true, making the later
...
check of "if not have_first_symbol and dosub then" always evaluate to
false (found by looking at the results of constant propagation :)
git-svn-id: trunk@26011 -
2013-11-10 15:08:28 +00:00
sergei
203efdcd0e
* Let order of fields in float64 record depend on FPC_DOUBLE_HILO_SWAPPED, so messing with this order on every usage of float64 is no longer necessary.
...
git-svn-id: trunk@26010 -
2013-11-10 14:52:57 +00:00
nickysn
c666649320
* proper fix for the passing of TEST_OPT to tstunits on msdos. The value of
...
TEST_OPT was normally already passed in OPT, but on msdos the old value
was killed, due to the 'override OPT=-CX'.
git-svn-id: trunk@26009 -
2013-11-10 14:36:06 +00:00
marco
b4496c4aba
* trim output buffer in try..finally, catch result iconv in variable.
...
git-svn-id: trunk@26008 -
2013-11-10 12:53:58 +00:00
nickysn
681350daba
* add the options specified in TEST_OPT when compiling the tstunits. This allows
...
running the testsuite for a different than the default i8086 memory model by
specifying (for example) TEST_OPT=-WmMedium
git-svn-id: trunk@26007 -
2013-11-10 12:23:26 +00:00
marco
be92aba9ba
* correction for missing start in wavstream record. Mantis #25268
...
git-svn-id: trunk@26006 -
2013-11-10 11:34:01 +00:00
Jonas Maebe
6359441045
* force shl operations to be 32 bit on 16/8 bit platforms (patch by
...
Max Nazhalov, mantis #25241 )
git-svn-id: trunk@26005 -
2013-11-10 10:24:54 +00:00
florian
a0f0d0de40
* make use of the noreturn directive for internalerror
...
* clean up of the internalerror procedure variable in the constexp unit
git-svn-id: trunk@26004 -
2013-11-10 09:01:03 +00:00
florian
1d4a4d0684
+ noreturn directive
...
git-svn-id: trunk@26003 -
2013-11-10 09:00:59 +00:00
nickysn
039979fdcc
* handle 4-byte records in registers as well in location_force_mem on i8086
...
git-svn-id: trunk@26002 -
2013-11-09 21:57:29 +00:00
Jonas Maebe
0302453912
* disabled the lea->add transformation added in r25907 because it breaks
...
webtbs/tw15694.pp. Such transformation require liveness analysis of
the flags
git-svn-id: trunk@26001 -
2013-11-09 18:42:23 +00:00
marco
22236de331
* adds IP and cachecontrol headers to http defs. Patch by Silvio Clécio
...
Mantis #25263
git-svn-id: trunk@26000 -
2013-11-09 17:06:07 +00:00
nickysn
b8de1370a0
* fixed assignment of i8086 method pointers, when the source is in a register
...
git-svn-id: trunk@25999 -
2013-11-09 16:50:56 +00:00
marco
c84ac2214d
* adapt sdl mixer wavestream to 2008 SDL change. Patch by Yuichiro Takahashi
...
Mantis #25268
git-svn-id: trunk@25998 -
2013-11-09 14:31:28 +00:00
sergei
5ea99c84fd
* x86_64 non-Win64 targets: calculate tan() and cotan() using x87 "fptan" instruction.
...
git-svn-id: trunk@25996 -
2013-11-09 11:31:27 +00:00
sergei
2b1e5f7014
* Mantis #17273 : don't generate x87 instructions on win64 target.
...
git-svn-id: trunk@25995 -
2013-11-08 13:31:07 +00:00
sergei
d83fbd7602
* Replaced fpc_arctan_real() implementation with one providing a better precision.
...
git-svn-id: trunk@25994 -
2013-11-08 11:33:57 +00:00
nickysn
7516b87382
* (temporarily) disabled the new str<->float code on the i8086, because it
...
causes a lot of wrong conversions and thus a lot of testsuite failures.
git-svn-id: trunk@25993 -
2013-11-08 08:22:35 +00:00