Commit Graph

1055 Commits

Author SHA1 Message Date
Jonas Maebe
9e9a982bfe * synchronised with trunk till r42095
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +00:00
pierre
c0f064a35c Remove two warnings about missing case (others are still present in ppudump.pp source)
git-svn-id: trunk@42085 -
2019-05-16 12:42:39 +00:00
Jonas Maebe
128bf046b4 * regenerated Makefiles with LLVM bitcode installation support
git-svn-id: branches/debug_eh@41914 -
2019-04-20 18:56:45 +00:00
Jonas Maebe
fc60ec2ea4 + support for LLVM LTO: compile units with -CLflto -> when compiling a main
program/library also with -Clflto, all units compiled with that option
    will be linked using their bitcode files and LTO
   o compiling with -CLflto will compile all units twice: once for normal
     (static or smart) linking, and once for LTO. So the result can be
     used both with and without LTO.

git-svn-id: branches/debug_eh@41910 -
2019-04-20 18:56:11 +00:00
Jonas Maebe
2923e484fd * synchronised with trunk till r41907
git-svn-id: branches/debug_eh@41908 -
2019-04-20 18:22:52 +00:00
Jonas Maebe
d150869dea * record symbols that need to remain in their original order, and on Darwin
pass them to the linker so it does not reorder them
   o fixes resource strings on Darwin when using LTO (this used to reorder the
     resource string symbols, so they no longer all appeared between the START
     and END symbols for their compilation module)

git-svn-id: trunk@41907 -
2019-04-20 18:18:10 +00:00
Jonas Maebe
0225a3a39a * ppudump: fixed reading of ibresource section
git-svn-id: trunk@41905 -
2019-04-20 18:18:03 +00:00
pierre
ec76e879c9 Integrate patch from bug report 35409.
Add possibiliy to throw InternalError
  for unhandled case values inside tentryfile,
  But avoid adding dependency on verbose unit
  as this would break ppudump handling of ppu files.

  Add RaiseAssertion virtual method to tentryfile class.
  Call RaiseAssertion in tentryfile methods
  where an internal error is wanted.
  Override RaiseAssertion method in symtype.pas unit
  to call InternalError.
  Add new class tppudumpfile to override RaiseAssertion
  in utils/ppuutils/ppudump.pp unit.

git-svn-id: trunk@41896 -
2019-04-18 14:08:03 +00:00
Jonas Maebe
a7bd37d17a * synchronised with trunk till r40776
git-svn-id: branches/debug_eh@41867 -
2019-04-13 15:16:09 +00:00
Jonas Maebe
349bb2ff38 * check CurrentPPULongVersion in ppumove
git-svn-id: trunk@41866 -
2019-04-13 15:12:09 +00:00
Jonas Maebe
0b61b5d4cf * added extra header to ppu inside a subsection, so we won't run into
trouble when the ppu version hits 255
  * also moved several ppu flags to a set inside that section

git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +00:00
Jonas Maebe
dc2cbf8018 * synchronised with trunk till r41725
git-svn-id: branches/debug_eh@41726 -
2019-03-17 15:25:31 +00:00
Jonas Maebe
1bb8bd471a * fix msgtxt array size if the text size is an exact multiple of 240
git-svn-id: trunk@41725 -
2019-03-17 15:22:06 +00:00
pierre
74fed2a4cd Regenerate Makefile's after fpcmake change in commit #41721
git-svn-id: trunk@41723 -
2019-03-17 14:45:03 +00:00
yury
b0535d8d0f * ppudump: Fixed a warning regarding text clipping.
git-svn-id: trunk@41628 -
2019-03-07 10:36:05 +00:00
yury
54756c0f60 * ppudump: Fixed formatting of a error message.
git-svn-id: trunk@41627 -
2019-03-07 10:33:04 +00:00
yury
37941d03cc * ppudump: Avoid using GetLastOSError on platforms that doesn't support it (e.g. go32v2).
git-svn-id: trunk@41625 -
2019-03-07 10:18:15 +00:00
Jonas Maebe
ac883969a9 * synchronised with trunk till r41423
git-svn-id: branches/debug_eh@41424 -
2019-02-23 17:08:03 +00:00
Jonas Maebe
8b9e90dc7a * keep track of whether a routine has a C-style variadic parameter in the
procoptions even when it's through an array-of-const parameter
  * always call create_varargs_paraloc_info() instead of create_paraloc_info()
    in the former case, even when no varargs parameters are specified (because
    on some platforms even some non-variadic parameters need to be passed
    differently, such as on ARM with gnueabihf)

git-svn-id: trunk@41420 -
2019-02-23 15:42:45 +00:00
yury
fa4596a08f * ppudump: Fixed warnings with -O3.
git-svn-id: trunk@41394 -
2019-02-20 10:24:48 +00:00
yury
9a3ddf650c * ppudump: Use buffered write when outputting to json or xml. It improves the output speed a lot.
git-svn-id: trunk@41393 -
2019-02-20 10:13:18 +00:00
florian
6b0c2a45f5 * compilation fixes
git-svn-id: branches/debug_eh@41290 -
2019-02-10 19:33:14 +00:00
Jonas Maebe
503ea604f3 + nolinline modifier to specify that a routine must never be inlined
git-svn-id: trunk@41198 -
2019-02-03 21:00:17 +00:00
joost
6ffe906794 * Mover {CompilerVersion} from the fppkg.cfg template to samplecfg, because
on Windows it is possible to install fpc in a location without the 
   compilerversion in the path.

git-svn-id: trunk@41184 -
2019-02-03 13:32:43 +00:00
Károly Balogh
6c87b89e45 atari: fpc now searches for the compiler with .ttp extension, as that's the default on Atari
git-svn-id: trunk@41141 -
2019-01-30 10:48:27 +00:00
pierre
3e2b102a44 Add missing support for -PriscvXX and -Psparc64
git-svn-id: trunk@40833 -
2019-01-10 12:18:22 +00:00
Jonas Maebe
51e68eb302 * fixed several places where the interface crc could change:
o unsetting po_inline while parsing the implementation for various reasons
     (interprocedural goto/label, accessing a local in a parent frame,
      having nested procedures)
   o instead handle this via the pio_inline_not_possible flag
   o noreturn can no longer be specified only in the implementation

git-svn-id: trunk@40789 -
2019-01-06 20:35:56 +00:00
Károly Balogh
5182dc37af haiku-x86_64: regenerated all Makefiles, take 2
git-svn-id: trunk@40758 -
2019-01-04 03:18:42 +00:00
Károly Balogh
2f7fe0e737 haiku-x86_64: add target to the compiler and ppudump, enable it in fpmake and fpcmake
git-svn-id: trunk@40753 -
2019-01-04 02:16:24 +00:00
Jonas Maebe
50ab607676 + customint torddef type to create arbitraty bit-width integers
o use this to handle non-power-of-two-sized parameters for llvm
   o no general support in the parser/code generator, so don't expose

git-svn-id: trunk@40398 -
2018-11-29 20:57:08 +00:00
pierre
0052e4da81 * Use getasizeint/putasizeint for tfieldvarsym.fieldoffset
* Change CurrentPPUVersion

git-svn-id: trunk@40347 -
2018-11-18 10:32:13 +00:00
florian
9f16c34329 + initial work for tls-based threadvar support on arm-linux
git-svn-id: trunk@40267 -
2018-11-07 22:02:58 +00:00
yury
dd60397165 + Added the pio_inline_not_possible flag to timplprocoption. It is set if a function can't be inline (contains an assembler block, etc). When calling such functions, no note "Call to subroutine "?" marked as inline is not inlined" is emitted.
git-svn-id: trunk@40254 -
2018-11-07 12:20:30 +00:00
pierre
e49025a086 More -CriotR fixes:
* entfile.pas: Change PPU header falgs filed from longint to dword.
  * ngtcon.pas: Change local variable startoffset type to aword.
  * omfbase.pas: Avoid calling move with a nil string s indexed as s[1],
    to avoid a range check error.
  * owomflib.pas: Disable range check explicitly in hash computation.
  * utils/ppuutils/ppudump.pp: Adapt to flags type change in entfile.pas

git-svn-id: trunk@40163 -
2018-11-01 21:58:54 +00:00
pierre
3b49fda0a2 Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]
git-svn-id: trunk@40132 -
2018-11-01 07:09:47 +00:00
pierre
9c2ac7b3dd Avoid range check error in ReadPosInfo
git-svn-id: trunk@40115 -
2018-10-31 22:53:11 +00:00
pierre
378e1dfaa4 Add explicit typecast to avoid range check error
git-svn-id: trunk@40001 -
2018-10-20 22:19:08 +00:00
yury
a29290202f * Regenerated makefiles to support x86_64-android.
git-svn-id: trunk@39958 -
2018-10-17 17:12:20 +00:00
yury
e367577bf1 + added support for x86_64-android target.
git-svn-id: trunk@39956 -
2018-10-17 16:56:27 +00:00
Jonas Maebe
0b246f3dbd * converted Boolean8 to an internal type, and mapped Boolean to the
new internal pasbool1(type) (part of mantis #34411)
   o apply the _Bool x86-64 parameter passing rules only to pasbool1

git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
pierre
a898ae856f Adapt ppudump to fix introduced in revision 39912
git-svn-id: trunk@39914 -
2018-10-12 06:05:50 +00:00
yury
8c59eb1ce5 * Regenerated makefiles to support aarch64-android.
git-svn-id: trunk@39863 -
2018-10-06 09:36:03 +00:00
yury
671d31df1d + Added support for the aarch64-android target.
git-svn-id: trunk@39862 -
2018-10-06 09:33:09 +00:00
pierre
915fb05055 Update remaining Makefile's
git-svn-id: trunk@39830 -
2018-09-27 07:10:27 +00:00
florian
a34d4e715c Merged riscv_new branch
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
svenbarth
600ed6701e + keep track whether a structured type has fields with management operators (or fields that in turn have fields with management operators and so on) and store that in the PPU to speed up compilation again
* adjusted PPUdump for this

git-svn-id: trunk@39709 -
2018-09-03 18:00:27 +00:00
marco
98f00acb06 * trunk to 3.3.1
git-svn-id: trunk@39635 -
2018-08-18 15:47:44 +00:00
Jeppe Johansen
2aaf481d89 Regenerated makefiles.
git-svn-id: branches/laksen/riscv_new@39476 -
2018-07-20 10:40:57 +00:00
Jeppe Johansen
ceb38833f2 Added RiscV32/64 target, from a cleaned up version of branches/laksen/riscv/trunk.
git-svn-id: branches/laksen/riscv_new@39474 -
2018-07-20 08:21:15 +00:00
svenbarth
cc153176f3 + add a new symtable option sto_has_non_trivial_init that is true if the symtable contains a symbol with an
Initialize() operator (like sto_needs_init_final this flag is calculated on demand)
* increase PPU version

git-svn-id: trunk@39252 -
2018-06-20 19:00:08 +00:00
florian
8c0d5411d0 * dwarf numbers corrected
* zmm14 definition fixed
+ commented definitions for bnd/k registers added
* made reg. cound a longint

git-svn-id: branches/tg74/avx512@39209 -
2018-06-10 14:17:37 +00:00
tg74
31e4d4ef5e AVX512 support for MMRegister xmm16..31 and ymm16..31, zmm0..31, vpaddsb support AVX512
git-svn-id: branches/tg74/avx512@39196 -
2018-06-08 06:53:35 +00:00
florian
21d785e41b * do not unroll loops if the counter variable is accessed outside the current scope
git-svn-id: trunk@39163 -
2018-06-03 15:12:48 +00:00
nickysn
a275d15da2 + added an i8086-specific column in x86reg.dat for the dwarf register numbers
and filled it with the dwarf register mapping, used by Open Watcom (Watcom
  also uses this mapping on i386, but we don't need to support their debugger on
  i386 for now)

git-svn-id: trunk@39097 -
2018-05-23 15:12:58 +00:00
pierre
d12ba4d37d Regenerated Makefile's after addition of ppas and ppaslink script removal in rev 38745
git-svn-id: trunk@38749 -
2018-04-12 15:21:49 +00:00
pierre
79730fe479 Fix compilation error after introduction of po_hasnearfarcallmodel
git-svn-id: trunk@38734 -
2018-04-11 20:09:05 +00:00
pierre
554c0c5a2a Avoid to access past length of string in last commit
git-svn-id: trunk@38417 -
2018-03-05 21:43:28 +00:00
pierre
01154e1f55 Also discard lines beginning with # for multiline messages
git-svn-id: trunk@38416 -
2018-03-05 21:36:37 +00:00
Károly Balogh
77b97abe61 arm-netbsd: regenerated the required Makefiles
git-svn-id: trunk@38413 -
2018-03-05 15:44:49 +00:00
Károly Balogh
dbb91b5ef0 arm-netbsd: added platform define and dummy rtl files so the build passes for this platform. port not functional yet
git-svn-id: trunk@38412 -
2018-03-05 15:38:46 +00:00
svenbarth
d50848174a + add putboolean and getboolean convenience methods to tentfile
* use putboolean and getboolean where approbiate

git-svn-id: trunk@37972 -
2018-01-14 21:36:02 +00:00
florian
5bedaf11f4 * fpcmake.inc and Makefiles renerated after last commit
git-svn-id: trunk@37834 -
2017-12-27 15:08:18 +00:00
florian
b41cb26727 + write selected features in ppu of the system unit and load them further on
* ppu version update
* -Sf might be used only during system unit compilation
* loadsystemunit factored out so the system unit can be loaded earlier than other units to get features set

git-svn-id: trunk@37708 -
2017-12-10 16:32:56 +00:00
Károly Balogh
0d15323c29 also add solaris-sparc64 to ppudump, fix build breakage after r37701
git-svn-id: trunk@37702 -
2017-12-08 17:16:32 +00:00
florian
3bcf774c7b * compilation fixed
git-svn-id: trunk@37534 -
2017-10-30 21:01:10 +00:00
pierre
d18627f0af * Update all fpcsrc Makefile's using latest fpcmake version 2017-09-21 rev 37286
git-svn-id: trunk@37462 -
2017-10-16 00:27:27 +00:00
florian
198c53a908 o patch by J. Gareth "Kit" Moreton, resolves partially issue #32037
* generate instructions with shorter imm on x86-64 if possible

git-svn-id: trunk@37376 -
2017-10-01 18:40:09 +00:00
pierre
1aa731df63 Fix Absolute var symbol address (was failing for AVR cpu)
git-svn-id: trunk@37320 -
2017-09-25 18:44:16 +00:00
nickysn
e701fa8de1 * converted the x86 instruction flags to a set, so they can be extended more
easily and so that all the values are now available to the compiler
  (previously, there were several, which were mapped to the same value and thus
  were only used to make x86ins.dat easier to read)

git-svn-id: trunk@37299 -
2017-09-21 15:48:27 +00:00
pierre
ce332eb2e2 Fix failures for rtl ppudump on sparc cpu
git-svn-id: trunk@37250 -
2017-09-18 14:10:19 +00:00
pierre
bd428ce6ad Use getptruint for pointer type const, fixes i8086 ppudump problems
git-svn-id: trunk@37242 -
2017-09-17 20:44:08 +00:00
pierre
e1dbb5edcb Fix crash for GenConstraints handling
git-svn-id: trunk@37209 -
2017-09-15 08:43:17 +00:00
pierre
8bdd161805 Fix error for jvm compiler
git-svn-id: trunk@37207 -
2017-09-14 15:13:31 +00:00
pierre
6a09a68156 Fix failures in rtlppulogs
git-svn-id: trunk@37206 -
2017-09-14 13:41:06 +00:00
svenbarth
a6821c63e0 * store the type of the helper that had been encountered during parsing in the objectdef and by extension the PPU
git-svn-id: trunk@37202 -
2017-09-13 21:24:06 +00:00
Károly Balogh
04dee0fc04 regenerated Makefiles for m68k-macos target
git-svn-id: trunk@37034 -
2017-08-22 11:16:42 +00:00
florian
9529416ba0 + sparc64 support for the fpc executable
git-svn-id: trunk@36959 -
2017-08-20 17:20:40 +00:00
Károly Balogh
addc3a2f94 m68k-palmos: fixed the syscall generation, and improved it to support the dispatch-selector-in-reg-D2 traps
git-svn-id: trunk@36892 -
2017-08-13 01:19:19 +00:00
pierre
4c7b73d48d Adjust string size for CpuTxt and Targets string arrays
git-svn-id: trunk@36861 -
2017-08-08 18:17:20 +00:00
pierre
708b9e162c Add obsolete comment in ppudump output for obsoleted cpu and systems
git-svn-id: trunk@36824 -
2017-08-04 09:07:01 +00:00
florian
a2e442e111 * keep the names of X, Y and Z in assembler files, fixes issue #32150
git-svn-id: trunk@36776 -
2017-07-23 19:24:45 +00:00
florian
8c33fbbe64 * indention fixed
git-svn-id: trunk@36775 -
2017-07-23 19:24:43 +00:00
florian
85050f3383 * Makefiles regenerated
git-svn-id: trunk@36528 -
2017-06-18 21:06:34 +00:00
nickysn
e667a18838 + support the codepage directive in the msg2inc converter util
* msgtxt.inc updated to include the codepage info

git-svn-id: trunk@36449 -
2017-06-08 15:46:30 +00:00
Károly Balogh
365d774ca7 fixed zipinstall after r36418
git-svn-id: trunk@36419 -
2017-06-04 23:11:51 +00:00
florian
a3aa2616fc * Makefiles regenerated
git-svn-id: trunk@36382 -
2017-05-31 20:59:41 +00:00
florian
b59e4f5652 + register .inc files for SPARC64
git-svn-id: trunk@36380 -
2017-05-31 20:58:30 +00:00
maciej-izak
e91402af87 * better text format for management operators in ppudump.pp
git-svn-id: trunk@36202 -
2017-05-13 17:46:58 +00:00
pierre
d6bf9e03ec Add missing management operator options to ppudump
git-svn-id: trunk@35934 -
2017-04-24 12:43:30 +00:00
nickysn
9303a8f61a * changed the x86 TInsProp.Ch structure from a 3-element array to a pascal set;
this removes the limit of 3 Ch_XXX flags per instruction (thus allowing adding
  more precise flags, e.g. for tracking only certain bits of the flags register,
  etc.) and avoids the ugliness of having the Ch_None filler, which makes
  x86ins.dat less readable.

git-svn-id: trunk@35850 -
2017-04-19 16:48:35 +00:00
pierre
17b2671213 Regenerate all Makefile's after changes related to FPCDIR checks
git-svn-id: trunk@35833 -
2017-04-18 14:15:47 +00:00
yury
ea61dee00b * ppudump: Mark objects with abstract methods in the JSON/XML output.
* pas2jni: Properly handle inherited classes when an ancestor has abstract methods.

git-svn-id: trunk@35746 -
2017-04-07 09:53:54 +00:00
florian
8025119048 + z80 support for ppudump
git-svn-id: branches/z80@35675 -
2017-03-28 20:19:30 +00:00
florian
e370e9ba15 * register names fixed
git-svn-id: branches/z80@35670 -
2017-03-27 20:30:51 +00:00
florian
ea52a23179 + skeleton for Z80 support
git-svn-id: branches/z80@35665 -
2017-03-26 19:10:50 +00:00
yury
29986a1616 * Removed unused vars.
git-svn-id: trunk@35534 -
2017-03-07 08:24:10 +00:00
Károly Balogh
e8cad013f4 ppudump: fix build after r35497
git-svn-id: trunk@35500 -
2017-03-01 15:41:37 +00:00
florian
8ba0abf0d7 * avoid warning about OutName not being initialized
git-svn-id: trunk@35386 -
2017-02-04 13:25:38 +00:00
svenbarth
1a6a8b7c9f + introduce a new potype for the main stub of a package library (which on Windows is simply a DLLMain returning True)
git-svn-id: trunk@35371 -
2017-01-29 22:37:40 +00:00
svenbarth
c1db48c8c6 * add ability to disable the generation of an indirect symbol if needed (useful if that's done by the constant builder)
Note: I'm not yet really happy with both AT_DATA_FORCEINDIRECT and AT_DATA_NOINDIRECT; maybe I should replace them with flags or something like that...

git-svn-id: trunk@35366 -
2017-01-29 17:42:00 +00:00
florian
bba23f6561 * warnings fixed
* cleanup

git-svn-id: trunk@35169 -
2016-12-18 20:28:38 +00:00
Károly Balogh
7c1c964c28 arm-aros: enabled basic AROS on ARM build
git-svn-id: trunk@34811 -
2016-11-06 14:40:02 +00:00
florian
9553e8b5a8 * fix building of ppudump
git-svn-id: trunk@34810 -
2016-11-06 14:35:32 +00:00
Károly Balogh
c7c37f66ed * refactored syscall types for unified naming,first bits of ARM AROS syscall support
git-svn-id: trunk@34806 -
2016-11-06 12:41:56 +00:00
marcus
86940dfb32 AROS: added arm-aros target to compiler and fpcmake
git-svn-id: trunk@34805 -
2016-11-06 10:51:45 +00:00
joost
bf8e3c9264 * Added example to samplecfg, to make clear which path is meant
git-svn-id: trunk@34733 -
2016-10-16 16:50:05 +00:00
joost
d08a747c29 * Create fppkg-config files in the new format (v5)
git-svn-id: trunk@34729 -
2016-10-16 15:43:27 +00:00
Károly Balogh
5db02f4202 atari: initial support for TOS syscalls
git-svn-id: trunk@34610 -
2016-10-03 23:37:30 +00:00
pierre
4d09dfca95 Remember usage of checkpointer (-gc) option:
Use new cs_checkpointer_called moduleswitches set element.
     Use new uf_checkpointer_called PPU flag (reusing obsolete uf_local_browser flag value)
     Emit warning if compiled library/program has any code using checkpointer.
  
 * ppu.pas: New constant: uf_checkpointer_called
 * globtype.pas: New constant: cs_checkpointer_called
 * fppu.pas: Set uf_checkpointer_called flag if cs_checkpointer_called is set in current_settings.module_switches
 * i8086/n8086mem.pas: Include cs_checkpointer_called in current_settings.moduleswitches
 *  ncgmem.pas: Likewise.
 * msg/errore.msg: Add new message saying that -gc and -Ur options are incompatible
   Add description to -gc option, saying it is experimental.
   Add warning at link time for program/library if checkpointer is used in any unit or main code.
 * options.pas: if -gc and -Ur options are used, never enable checkpointer code,
   instead output a warning that release is incompatible with -gc option.
 * pmodules.pas: proc_program: Check all modules for uf_checkpointer_called flag,
   emit a warning if checkpointer is used.
 * utils/ppuutils/ppudump.pp: Add code for uf_codepointer_called option.

git-svn-id: trunk@34567 -
2016-09-27 14:46:09 +00:00
Károly Balogh
464ecab542 huge syscall support refactor for Amiga-likes. removed large chunks of ancient duplicated code, and in general tried to make the entire thing more maintainable and cleaner. also added support for AROS EAXBase syscall convention
git-svn-id: trunk@34416 -
2016-09-03 07:57:23 +00:00
Károly Balogh
c5a123614a fixed explicit paraloc support in ppudump and made it work on all Amiga-like systems
git-svn-id: trunk@34394 -
2016-08-29 21:26:55 +00:00
svenbarth
c2662bd96a * mark defs created with create_global_internal() with df_internal so that they can be easily identified
git-svn-id: trunk@34316 -
2016-08-15 14:30:46 +00:00
pierre
0e6b4def67 * Also search for ppcXXX if ppcrossXXX is not found for -PB option, show default binary
git-svn-id: trunk@34269 -
2016-08-11 09:01:58 +00:00
pierre
c3ac426131 Fix testppudump by adding missing TAsmsymtype and TAsmsymbind
git-svn-id: trunk@34189 -
2016-07-22 16:42:10 +00:00
svenbarth
5bb121e91c Add a mechanism to keep track of assembler symbols that either publicly provided by a unit or used by a unit and that are not really baked by a Pascal symbol (e.g. public function aliases, RTTI & VMT symbol).
This basically revives the globalasmsym entry of the PPU though it feeds to different lists, one for the public (exported) symbols and one for the external (imported) symbols. Also the list of symbols is much smaller as it would be if all symbols would be dumped in there.

git-svn-id: trunk@34174 -
2016-07-22 13:08:32 +00:00
Jonas Maebe
6c5de5127c * fixed compilation with range checking enabled after r34139
git-svn-id: trunk@34156 -
2016-07-19 14:30:45 +00:00
nickysn
a8ad82b99f + added new unit flag uf_i8086_ss_equals_ds, which indicates memory models with
SS=DS. This is currently redundant (whether SS=DS can be derived by the other
  i8086 memory model unit flags), but in the future will allow adding extra
  memory models, where the SS=DS assumption differs from the current ones.

git-svn-id: trunk@34139 -
2016-07-16 11:16:25 +00:00
nickysn
44e4b638ec + added the uf_package_deny and uf_package_weak unit flags to ppudump
git-svn-id: trunk@34138 -
2016-07-16 10:58:50 +00:00
Jonas Maebe
6558d7a521 * no longer store the tprocdef.synthetickind field in ppu files
git-svn-id: trunk@34130 -
2016-07-14 15:26:03 +00:00
Jonas Maebe
2bd2e03309 * no longer use the synthetickind field of a procdef to determine whether
it's an automatically generated getter/setter, but a procoption. This
    way we no longer have to save/restore the synthetickind procdef field
    to/from ppu's. This way we can modify the field also after the interface
    has been parsed without affecting the crc (e.g. when creating wrappers
    for high level targets for routines that are only declared as "external"
    in the implementation)

git-svn-id: trunk@34129 -
2016-07-14 15:25:30 +00:00
Jonas Maebe
c0ff55e95a * changed the abstract method wrapper generation from thlcgobj to synthetic
methods. Implementing a fully functional g_external_wrapper() for llvm is
    quite hard, and the regular wrapper method that calls FPC_ABSTRACTERROR can
    in principle be optimized to a plain jump by tail call optimisation on other
    targets (to the extent that this matters, because most of them will be
    smartlinked away, and the ones that are executed will trigger an exception)
   o this means that the synthetic method generation needs to be run for all
     objectdefs on all platforms now, rather than only for Java classes

git-svn-id: trunk@34127 -
2016-07-14 15:24:13 +00:00
nickysn
5306ee552b * regenerated makefiles with latest fpcmake
git-svn-id: trunk@34008 -
2016-06-18 01:00:45 +00:00
nickysn
a58dd988a4 * regenerate makefiles after the fpcmake update
git-svn-id: trunk@34002 -
2016-06-17 22:05:59 +00:00
nickysn
c2305809dc + added an i8086-embedded target support to the compiler (RTL and makefile
support are not done yet)

git-svn-id: trunk@33999 -
2016-06-17 19:15:24 +00:00
svenbarth
22b0553be3 Fix PPUDump on PowerPC systems
compiler/utils/ppuutils/ppudump, readdefinitions:
  * with the move of most target specific PPU data into the target specific sym types the location of the library symbol for the Amiga-like systems has changed

git-svn-id: trunk@33965 -
2016-06-12 12:11:28 +00:00
svenbarth
15ff68e144 Fix formatting of the output of unit import symbols.
git-svn-id: trunk@33888 -
2016-06-03 16:09:07 +00:00
svenbarth
b073d2dac5 Fix a bug in ppudump that seems to be there since revision 1.
compiler/utils/pputils/ppudump.pp, readsymbols:
  * ibstartsyms only contains one longint, namely the count of the symbols, not two

git-svn-id: trunk@33887 -
2016-06-03 16:07:54 +00:00
svenbarth
34f65fd059 Fix ppudump
utils/ppuutils/ppudump.pp:
  + new procedure ReadUnitImportSyms which simply outputs all imported symbols
  * readimplementation: handle ibunitimportsyms with ReadUnitImportSyms

git-svn-id: trunk@33500 -
2016-04-14 18:04:35 +00:00
svenbarth
9d5f98eaa3 Merged revision(s) 28690 from branches/svenbarth/packages:
Extract reading of the PPU/PCP version into tentryfile.

entfile.pas:
  + add new getversion method which uses the pointer returned by getheaderaddr to read the PPU/PCP version
ppu.pas:
  - remove GetPPUVersion method
fppu.pas, pmodules.pas, utils/ppufiles.pp, utils/ppumove.pp, utils/ppuutils/ppudump.pp
  * replace call to GetPPUVersion by call to getversion
........

git-svn-id: trunk@32980 -
2016-01-22 15:47:29 +00:00
svenbarth
02e56f410d Merged revision(s) 28689 from branches/svenbarth/packages:
Extract functionality that is shared between the metadata files for units (PPU) and for packages (PCP) into a parent class called tentryfile

+ add new unit entfile which contains the new tentryfile class and related types and constants
* ppu.pas:
    - remove methods, fields, types and constants which were moved to entfile.pas
    * replace the parts of tppuheader shared with tentryheader by a field of type tentryheader
fppu.pas, pmodules.pas, utils/ppumove.pp, utils/ppuutils/ppudump.pp:
    + add entfile to uses
    * adjust access to common header fields
node.pas, symdef.pas, symsym.pas, symtable.pas, wpoinfo.pas, utils/ppufiles.pp:
    + add entfile to uses
........

git-svn-id: trunk@32976 -
2016-01-22 15:26:30 +00:00
pierre
40193ea1db Add pi_has_open_array_parameter to proc_info.flags as this requires special handling for i8086 huge memory model to restore DS register correctly
git-svn-id: trunk@32922 -
2016-01-11 15:02:10 +00:00
pierre
c863cd5bc8 Add u128bit and s128bit support in ppudump
git-svn-id: trunk@32898 -
2016-01-09 21:34:07 +00:00
Jonas Maebe
9258b5d76b + non-functional 128 bit integer types (inaccessible from Pascal), for use
in the LLVM high level code generator to implement overflow checking

git-svn-id: trunk@32735 -
2015-12-26 20:00:33 +00:00
Károly Balogh
9133964676 m68k: new 68k register data file format, which eases future subregister support
git-svn-id: trunk@32653 -
2015-12-13 17:29:47 +00:00
Jonas Maebe
01d93b61c3 * save/restore the type (and hence code page) of ansistring constsyms in/from
the ppu (mantis #28964)
  * also save/restore the type of constnil, constresourcestring and constguid
    in/from the ppu

git-svn-id: trunk@32617 -
2015-12-08 14:27:23 +00:00
pierre
8ca036c3b6 Derefedata length can be zero if there are no references in PPU
git-svn-id: trunk@32584 -
2015-12-04 17:26:30 +00:00
Jonas Maebe
fa3b0ca312 * support marking defs created via the getreusable*() class methods as
"don't free even if not registered"; use for defs that may not be written
    to a ppu file, but that must nevertheless survive the compilation of the
    current module
  * mark all defs created for para locations as "don't free even if not
    registered", because we don't discard and recalculate all para locations
    after a module has been compiled (since that's not needed)
   o solves issues if the paralocations for a routine in the interface of
     unit A are calculated while the implementation of unit B gets
     compiled, and a new reusable type is allocated at that point which
     is not used anywhere else (after r32160)

git-svn-id: trunk@32235 -
2015-11-04 20:46:18 +00:00
Jonas Maebe
d5aa498cf5 * fixed several issues related to dumping jvm ppu files
o don't use ifdefs related to symansistr or jvm, since these conditional
     defines are not set while compiling ppudump

git-svn-id: trunk@32234 -
2015-11-04 20:46:13 +00:00
Jonas Maebe
d80e318945 * adapted ppudump to the changes in r32031
git-svn-id: trunk@32056 -
2015-10-14 16:44:05 +00:00
joost
8e2a44db88 * Fixed problem with samplecfg that did not write the fppkg-configuration files when fp was not installed
git-svn-id: trunk@31943 -
2015-10-04 09:36:07 +00:00
pierre
3123d823a1 Fix -VD or -VS by partially reading Interface information
git-svn-id: trunk@31797 -
2015-09-23 16:34:02 +00:00
svenbarth
e44a51f10d symdef.pas, tprocdef:
+ new token buffer that holds the declaration of the generic function/method while the one from tdef contains the body
ppu.pas:
  * increase PPU version
utils/ppuutils/ppudump.pp:
  * also read the declaration token buffer, it's however not printed yet (ToDo!)

git-svn-id: trunk@31759 -
2015-09-18 13:46:50 +00:00
Jonas Maebe
faf4a9cb38 * moved the generation of the "main" stub for libc-based platforms from
hlcgobj to pmodules/symcreat/ngenutil, so that it also works for llvm

git-svn-id: trunk@31658 -
2015-09-12 23:34:01 +00:00
Jonas Maebe
c7a418829b * support for implementing interface method wrappers at the node tree
level, used by LLVM

git-svn-id: trunk@31636 -
2015-09-12 23:32:42 +00:00
nickysn
2e3cb70489 * regenerated makefiles after adding the win16 target
git-svn-id: trunk@31525 -
2015-09-05 11:02:54 +00:00
nickysn
3145d68fdb * fixed compilation of ppudump
git-svn-id: trunk@31522 -
2015-09-05 03:38:51 +00:00
pierre
960a72f821 Use AnsiString and sysutils GetEnvironmentVariable function to avoid truncation of PATH to 255 chars
git-svn-id: trunk@31202 -
2015-07-11 13:59:06 +00:00
Károly Balogh
77bdd83bfc AROS/x86_64: regenerated Makefiles
git-svn-id: trunk@31177 -
2015-06-29 00:09:06 +00:00
Károly Balogh
0dafa78d27 ppudump: made it compile with -Sew by turning off unreachable code warning for Real80BitToStr() function
git-svn-id: trunk@31010 -
2015-06-07 23:59:24 +00:00
Jonas Maebe
3c8068ad0b + Aarch64 support in the fpc binary (patch by Edmund Grimley Evans)
git-svn-id: trunk@30894 -
2015-05-22 09:25:08 +00:00
Jonas Maebe
8628d50aba + Linux/AArch64 compiler support (patch by Edmund Grimley Evans)
git-svn-id: trunk@30893 -
2015-05-22 09:25:05 +00:00
Jonas Maebe
89418d23e5 * regenerated Makefiles with Linux/AArch64 support
git-svn-id: trunk@30891 -
2015-05-20 20:15:10 +00:00
Jonas Maebe
1e7fcec236 * build mka64ins by default in the compiler/utils directory (patch by
Edmund Grimley Evans)

git-svn-id: trunk@30848 -
2015-05-14 14:42:15 +00:00
Jonas Maebe
585e4a9a14 * corrected cosmetic ARM/AArch64 copy/paste leftovers (patch by
Edmund Grimley Evans)

git-svn-id: trunk@30847 -
2015-05-14 14:42:12 +00:00
florian
e0b27e1688 * unified typing and ppu reading/writing of setdef fields regarding aint/asizeint
git-svn-id: trunk@30542 -
2015-04-11 11:36:01 +00:00
Jonas Maebe
b403a8c3fd * fixed ppu dump for objc categories
git-svn-id: trunk@30465 -
2015-04-06 14:05:39 +00:00
Jonas Maebe
f6b03b2912 * updated ppudump for changes in ppu version 174
git-svn-id: trunk@30464 -
2015-04-06 14:05:36 +00:00
Jeppe Johansen
914e9e7b49 Merged from trunk
git-svn-id: branches/laksen/armiw@30146 -
2015-03-08 12:33:46 +00:00
Jonas Maebe
fa328436ab * regenerated for iphonesim/x86-64
git-svn-id: trunk@29974 -
2015-02-23 22:56:41 +00:00
Jonas Maebe
749f393095 * fixed platform names for Darwin in ppudump
git-svn-id: trunk@29973 -
2015-02-23 22:56:24 +00:00
Jonas Maebe
79a06b1514 + iphonesim/x86_64 target (64 bit iOS simulator)
git-svn-id: trunk@29970 -
2015-02-23 22:56:09 +00:00
Jonas Maebe
3d01d4ceb1 * regenerated with Darwin/AArch64 support
git-svn-id: trunk@29950 -
2015-02-23 22:54:53 +00:00
Jonas Maebe
b5643f2a27 + aarch64 cpu identifier
git-svn-id: trunk@29876 -
2015-02-23 22:50:38 +00:00
Jonas Maebe
bedcc5cbb1 + Darwin/AArch64 system identifier
git-svn-id: trunk@29869 -
2015-02-23 22:50:16 +00:00
Jeppe Johansen
47dbec3111 Rebase to trunk revision
git-svn-id: branches/laksen/armiw@29708 -
2015-02-15 16:08:18 +00:00
Jonas Maebe
eb419b58c5 - disable inlining of routines that contain a call to a C-style varargs
function, as we don't save/restore the synthetic paravarsyms that
    are created for this

git-svn-id: trunk@29584 -
2015-01-30 19:31:22 +00:00
pierre
d939a163f7 Fix errors and improve ouput of ppudump
git-svn-id: trunk@29577 -
2015-01-29 16:37:21 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
Jonas Maebe
e97f31541e - reverted partial commit of merge
git-svn-id: branches/blocks@29515 -
2015-01-21 23:24:37 +00:00
Jonas Maebe
a76bbf363d * synchronised with trunk r29513
git-svn-id: branches/blocks@29514 -
2015-01-21 23:18:29 +00:00
marco
d407b668d1 * version updated to 3.1.1
git-svn-id: trunk@29399 -
2015-01-04 21:09:04 +00:00
Jeppe Johansen
7390acc426 Merged from recent trunk.
git-svn-id: branches/laksen/armiw@29369 -
2015-01-01 23:54:40 +00:00
joost
5b7f168d2c * Set the full path to the fpc-binary in the fppkg-configuration file
git-svn-id: trunk@29279 -
2014-12-13 11:24:21 +00:00
Jeppe Johansen
d023c63ad0 Add a lot of instruction table entries and missing instructions for support of most ARM32 mode instructions from ARMv4 up ARMv7A.
Add some VFP registers.
Rebuilt tables.
Added a lot of VFPv3 and Advanced SIMD(not supported yet) oppostfixes.
Implemented code in aasmcpu to generate binary code from the instructions. Only ARM32 supported so far.

git-svn-id: branches/laksen/armiw@29246 -
2014-12-10 20:38:23 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
Tomas Hajny
3ee3542744 * boolean constant instead of IFDEFs for detection of microcontroller support
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
pierre
aa6b62cf4c Add new procedure option: po_syscall_has_libsym,
include this option only of libsym field
 is non NIL.
 Use this option to only write redef of libsym if needed.
 Adapt ppudump source to this new procedure option.

git-svn-id: trunk@28732 -
2014-10-03 19:26:16 +00:00
pierre
fa8d44c523 Add missing generic/specialization parameter listing
git-svn-id: trunk@28728 -
2014-10-01 12:56:51 +00:00
Károly Balogh
da7efb8607 AROS: regenerated Makefiles to support i386-aros
git-svn-id: trunk@28438 -
2014-08-17 23:16:47 +00:00
Károly Balogh
4431ba2c08 merged/updated AROS/i386 target to trunk from AROS branch, to support Marcus Sackrow's work on AROS support which will hopefully benefit all Amiga-like targets (classic, MorphOS) on the long run. Compiler only, RTL comes in the next run.
git-svn-id: trunk@28432 -
2014-08-17 18:18:07 +00:00
nickysn
36d63b953e + added an i8086 specific boolean property is_huge to the tarraydef. For now it
will only be used for indexing huge pointers (i.e. only huge arrays with the
  ado_IsConvertedPointer array option will be supported). In the distant future,
  regular huge arrays may be supported as well (but that would require
  substantially more work, including adding hugeness support to other structures
  such as records, objects and classes, so I'm not planning on doing it anytime
  soon).

git-svn-id: trunk@28270 -
2014-07-26 13:27:46 +00:00
Jonas Maebe
c730e16031 * changed the syntax for block procvars from "xxx is block" to
"reference to ...; cdecl;". The "reference to ..." syntax is what Delphi
    uses for anonymous function references. The "cdecl;" indicates that this
    is for the C-variant of such references, which is what blocks are

git-svn-id: branches/blocks@28233 -
2014-07-18 09:15:29 +00:00
Jonas Maebe
bd09b88a5b + support for http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
o blocks are implemented as a variation of procedure variables
   o declaration of a block variable: "test: procedure(c: char) is block;"
     (C equivalent: (void)(^test)(char c) )
   o the compiler automatically converts procedures/functions whose address
     is passed to a block parameter or assigned to a block variable into
     a "block". This consists of
    1) generating a block descriptor (containing the size of the "block
       literal" (see below) and the signature of the invocation function
       encoded as an Objective-C selector)
    2) generating a wrapper function around the original funcion (with C
       calling convention), that has an extra first hidden parameter
       (marked as vo_is_parentfp in the compiler) whose type is a pointer
       to the describing "block literal"
    3) generating the "block literal", which contains a pointer to an
       external variable indicating whether this block captures context or
       not, some flags (see compiler/blockutl.get_block_literal_flags for
       info), a pointer to the wrapper function and a pointer to the
       descriptor. In the future, it will also contain captured variables.
   o right now, only global procedures/functions can be converted to blocks
     (because they don't require state capturing). The next steps are (Object
     Pascal) methods (not Objective-C methods, because Objective-C method
     procvars don't exist) and finally nested functions
   o on Mac OS X, the functionality will only work on Mac OS X 10.7 and later,
     because we have to use the so-called "ABI.2010.3.16" to ensure that
     our blocks aren't called as variadic functions by the runtime (which
     came out after the Mac OS X 10.6 release)
   o while the currently implemented functionality does not require any
     library support at all, there's no use enabling it on other platforms
     because unless it has been confirmed to work with a blocks runtime,
     there's no point in using blocks (they're just somewhat bulky procvars
     right now). Enabling it on other platforms (in combination with the
     GNUStep Objective-C run time), should simply be a matter of adding
     the right {$linklib xxx} statement to rtl/inc/blockrtl.pp file, adding
     that file to Makefile.fpc for that platform and adding that platform
     to the compiler/systems.systems_blocks_supported set

git-svn-id: branches/blocks@28232 -
2014-07-18 09:15:22 +00:00
sergei
dc628b8969 * x86: Completely skip instructions that do not exist for target CPU bit width. The existing behavior of writing mnemonics and properties but no encoding allows an invalid instruction to be recognized by assembler reader or even generated by compiler, but it but won't assemble anyway.
git-svn-id: trunk@27934 -
2014-06-11 22:31:40 +00:00
pierre
365666c833 Fix remaining failure for make testppudump at compiler level
git-svn-id: trunk@27568 -
2014-04-13 19:31:55 +00:00
nickysn
0ef858a6ca * fixed the reading of x86 pointer defs in ppudump after the ppuwrite_platform
changes

git-svn-id: trunk@27557 -
2014-04-13 11:40:20 +00:00
nickysn
9ab2aa7463 * fixed ppudump after r27434
git-svn-id: trunk@27556 -
2014-04-13 09:56:17 +00:00
nickysn
e21783a281 * i8086 small and tiny memory model ppus made incompatible. Rationale:
o the maintenance effort will be less - previously we had to test 4
    combinations:
      tiny program with tiny rtl
      tiny program with small rtl
      small program with tiny rtl
      small program with small rtl
    I only tested both tiny and small programs with the small rtl, so I missed
    a bug, which caused small programs built with the tiny rtl to always give
    a "Nil pointer assignment" error. Now we only need to test two cases:
      tiny program with tiny rtl
      small program with small rtl
  o I'm planning a bug fix for interrupt procedures in the tiny model, which
    will make their prolog differ between small and tiny. Currently, they're
    not used in the rtl, but that may change. And even if it doesn't,
    interrupt procedures may also be used by user units.

git-svn-id: trunk@27516 -
2014-04-10 16:31:06 +00:00
marco
56277b18db * move fpcsubst to utils/ because it uses classes
git-svn-id: trunk@27370 -
2014-03-30 11:45:51 +00:00
florian
686a2d2f3f + Support omitting the frame pointer on arm even in procedures with incoming parameters
on the stack, this can be enabled by -OoFORCENOSTACKFRAME. This reduces the required
  entry/exit code and makes an extra register available to the compiler. However, since this is
  based on an estimation of the required stack size, it might have two drawbacks:
  either the stack frame is estimated to big, the program requires a bigger stack than needed
  or it is estimated too small, then the compiler throws an internalerror during compilation. These
  issues can be overcome as soon as the compiler supports recompiling subroutines if needed.

git-svn-id: trunk@27239 -
2014-03-23 14:38:53 +00:00
Jonas Maebe
1ac4021178 * moved po_has_inlininginfo from procoptions to procimploptions so that
the availability of the body of a function declared as "inline" no
    longer changes the CRC and hence no longer triggers recompilations
    (mantis #24121)

git-svn-id: trunk@27192 -
2014-03-19 21:53:10 +00:00
Jonas Maebe
72c1e2a8ce * write newline after synthetickind
git-svn-id: trunk@27191 -
2014-03-19 21:53:06 +00:00
Jonas Maebe
c47b4cbe86 * fixed spacing of "alias names"
git-svn-id: trunk@27190 -
2014-03-19 21:53:02 +00:00
Jonas Maebe
7d8e9cf0f6 * moved tprocdef.isempty to a new set called implprocoptions that
contains flags related to the procdef's implementation (and that
    don't influence the interface crc)

git-svn-id: trunk@27189 -
2014-03-19 21:52:59 +00:00
florian
b2b26f84cf * partially merged the mips-embedded branch of Michael Ring:
- startup code/controller units are not merged yet
  - assembler call does not pass the needed CPU type yet

git-svn-id: trunk@27188 -
2014-03-19 21:25:38 +00:00
Jeppe Johansen
7fdb125356 Added AVR support to fpc and root Makefile.
Rebuilt root Makefile.

git-svn-id: trunk@26944 -
2014-03-04 08:02:10 +00:00
svenbarth
47b4a52c8f Also respect the supplied version suffix when printing the compiler path name using -PB. Fixes Mantis #25791
* compiler/utils/fpc.pp:
    also apply the versionstr suffix to ppcbin if versionstr is set like is done when really executing the compiler

git-svn-id: trunk@26887 -
2014-02-26 19:13:06 +00:00
yury
73c26bd6be * mipsel-android: Regenerated makefiles. From now the mipsel-android target can be built and used.
git-svn-id: trunk@26705 -
2014-02-07 12:37:17 +00:00
yury
56b3287e29 + Added compiler support for mipsel-android target.
git-svn-id: trunk@26686 -
2014-02-06 17:02:43 +00:00
paul
19d71655eb utils: fix few errors with sharepath in samplecfg
git-svn-id: trunk@26424 -
2014-01-11 16:15:02 +00:00
paul
4df2637e99 fpc: pass sharepath to fpc.cfg maker using samplecfg
git-svn-id: trunk@26423 -
2014-01-11 14:41:45 +00:00
yury
eea69a2947 * ppudump: Fixed json and xml output of inline types in array declaration.
git-svn-id: trunk@26277 -
2013-12-24 12:32:55 +00:00
yury
996ee048be * ppudump: Properly handle type definitions inside a class definition for json and xml output.
git-svn-id: trunk@26273 -
2013-12-23 14:45:03 +00:00
yury
bc14407ffe * ppudump: Deref index -1 is valid for absolute symbols. Handle this.
git-svn-id: trunk@26270 -
2013-12-23 12:26:28 +00:00
yury
7e8ce16f6b * ppudump: Output the "default" option for properties.
git-svn-id: trunk@26173 -
2013-12-03 14:31:33 +00:00
florian
1d4a4d0684 + noreturn directive
git-svn-id: trunk@26003 -
2013-11-10 09:00:59 +00:00
nickysn
e160dab697 + added i8086 to the list of supported CPUs by FPC.exe
git-svn-id: trunk@25792 -
2013-10-15 13:29:51 +00:00
nickysn
f6e846c574 + added the NEC V20/V30 instructions
git-svn-id: trunk@25750 -
2013-10-11 21:27:56 +00:00
yury
b293f7e5c4 * ppudump: Do not skip unnamed inline array type definitions such as "var arr: array of integer";
git-svn-id: trunk@25716 -
2013-10-07 20:15:13 +00:00
nickysn
9ed0d6d40d * updated ppudump after r25672
git-svn-id: trunk@25673 -
2013-10-06 00:45:03 +00:00
nickysn
1bea98995b * regenerated fpcmake makefiles after r25642
git-svn-id: trunk@25644 -
2013-10-05 10:11:27 +00:00
sergei
5af873ee5b * x86 targets: Profiling shows that quite a bit of time is spent in findreg_by_number(), despite it uses binary search. Worse, it is repeated for every piece of register information. Trying to get rid of some of these calls: rearranged registers so that their "opcode" matches 3 LSBs of superregister number (with a few exceptions described at the beginning of x86reg.dat). This allows to lookup opcodes in regval() with O(1) complexity, and removes need in rXXXop.inc files.
git-svn-id: trunk@25627 -
2013-10-03 08:08:04 +00:00
nickysn
c47d745bcf + added support for i8086 in mkx86ins.pp
git-svn-id: trunk@25601 -
2013-09-28 21:06:09 +00:00
nickysn
d8ef5aa3c4 * mkx86reg.pp updated to support i8086
git-svn-id: trunk@25599 -
2013-09-28 20:56:47 +00:00
nickysn
bf3e48d8e0 * compilation of ppudump fixed
git-svn-id: trunk@25368 -
2013-08-25 17:11:57 +00:00
nickysn
571e9c2e3e + added the new i8086 memory model flags to ppudump as well
git-svn-id: trunk@25366 -
2013-08-25 16:48:13 +00:00
sergei
5c4abfa75a + Implemented saving/restoring registers using PUSH/POP instructions on i386 targets with non-fixed stack. Provides some advantage in code size (e.g. the compiler becomes about 20KBytes smaller).
* This should be applicable to i8086 targets as well (but needs testing), by copying changes from i386/cgcpu.pas to i8086/cgcpu.pas and removing "$ifdef i386" lines in cgx86.pas.

git-svn-id: trunk@25224 -
2013-08-07 09:59:07 +00:00
nickysn
381c996e53 + added po_far to tprocoptions
git-svn-id: trunk@24815 -
2013-06-08 16:34:30 +00:00
svenbarth
956b26bc97 Completely reworked implementation of generic constraints, by moving the generic constraint data from the symbols to the definitions (I originally thought that this would simplyfy things, but the more correct approach is to add it to the defs).
symsym.pas:
    - remove "tgenericconstraintdata" and any using/loading/writing of it in "ttypesym"
    - remove "tgenericconstraintflag"
symdef.pas:
    + add "tgenericconstraintdata"
    + load and write "genconstraintdata" in "tstoreddef"
symconst.pas:
    + add "tgenericconstraintflag" so it can be used in "ppudump" as well
defcmp.pas, compare_defs_ext:
    * as we allow global operator overloads we can't really determine whether two defs are compatible, because a valid operator for the specialization types might just happen to be in scope of the generic; so for now constraints are only strictly checked when declaring a specialization
pgenutil.pas:
    * adjust "parse_generic_parameters" and "check_generic_constraints" to the new location of the constraint data
ppudump.pp:
    * corrrectly parse defs which contain generic constraints

git-svn-id: trunk@24628 -
2013-05-29 08:19:02 +00:00
nickysn
10ef91a7f6 * updated ppudump after the x86 pointer type changes introduced in r24453
git-svn-id: trunk@24548 -
2013-05-21 14:46:52 +00:00
svenbarth
f1f89c77c3 Finally refactor "b_needs_init_final" flag to be a symtable flag which is written to/loaded from the PPU (as discussed in the thread "Status report for "class helpers"" in fpc-devel on 29th January 2011).
symconst.pas:
    + add "sto_needs_init_final" value to "tsymtableoptions"
symtable.pas:
    - TStoredSymtable: remove "b_needs_init_final"
    + TStoredSymtable: add "init_final_check_done" (which is False by default)
    * TStoredSymtable.ppuload: set "init_final_check_done" to True if PPU is loaded (because the flag will then already be restored)
    * TStoredSymtable.needs_init_final: check the symbols only if "init_final_check_done" is not set yet
    * TStoredSymtable._needs_init_final: only check the symbol if "sto_needs_init_final" is not set yet and set the flag accordingly if needed
utils/ppuutils/ppudump.pp:
    * respect the new flag

git-svn-id: trunk@24523 -
2013-05-17 12:15:13 +00:00
yury
10c1b11d15 * ppudump: Output "RetType" attribute for procedures and destructors.
git-svn-id: trunk@24511 -
2013-05-15 14:18:38 +00:00
yury
2ec85e9705 * ppudump: Output "Size" attribute for objects and records.
git-svn-id: trunk@24506 -
2013-05-15 09:13:12 +00:00
yury
ec6ff22588 * ppudump: Output "MethodPtr" attribute for procedural types.
git-svn-id: trunk@24504 -
2013-05-15 08:15:23 +00:00
nickysn
0b09c50138 * updated ppudump because of the ppu changes in r24491
git-svn-id: trunk@24497 -
2013-05-14 19:22:54 +00:00
paul
d38bd1b9bd compiler: remove dummy ado_none from tarraydefoption. It is probably a leftover from time when tarraydefoptions was not present, comment options
ppudump: simplify readarraydefoptions

git-svn-id: trunk@24456 -
2013-05-07 06:51:32 +00:00
paul
17e7ef0d28 ppudump: fix help message
git-svn-id: trunk@24416 -
2013-05-04 02:23:39 +00:00
yury
15b3695a0e * ppudump: Proper tag for a source file in XML.
git-svn-id: trunk@24411 -
2013-05-03 15:13:28 +00:00
yury
eb26ccfbe7 * ppudump: Proper output of Unicode string constants.
git-svn-id: trunk@24410 -
2013-05-03 15:04:50 +00:00
yury
906cd9d365 + ppudump: XML output.
git-svn-id: trunk@24409 -
2013-05-03 14:27:17 +00:00
yury
65d832420e * ppudump:
- Check PPU version to be the same as the current PPU version of the compiler. It prevents reading errors if a unit has wrong PPU version. The version check can be turned off using -S switch.
  - User WriteError() in appropriate places in the code.
  

git-svn-id: trunk@24408 -
2013-05-03 13:03:22 +00:00
yury
ad8f42cd29 * ppudump: JSON output of float, string, file, variant, undefined, formal definitions.
git-svn-id: trunk@24407 -
2013-05-03 12:28:19 +00:00
yury
44a0b61224 * ppudump: Write errors to StdErr and write warnings to StdErr when output to JSON.
git-svn-id: trunk@24406 -
2013-05-03 11:12:15 +00:00
yury
3a8ed11e23 * ppudump: JSON output of pointers and ordinal definitions.
git-svn-id: trunk@24405 -
2013-05-03 11:04:18 +00:00
yury
679a8d9dd6 * ppudump: JSON output of sets and set constants.
git-svn-id: trunk@24394 -
2013-04-30 15:09:05 +00:00
yury
026200d75a * ppudump: JSON output of enums.
git-svn-id: trunk@24393 -
2013-04-30 14:09:37 +00:00
pierre
6d3121078d Regenerate all Makefiles with an up-to-date fpcmake binary
git-svn-id: trunk@24373 -
2013-04-29 12:48:11 +00:00
Jonas Maebe
6462d10b17 * de-tabbed
* mention ppudump (mantis #24328)

git-svn-id: trunk@24355 -
2013-04-28 13:45:03 +00:00
Jonas Maebe
52dd59ee74 * write full help when executing ppudump without parameters (based on patch
by Reinier Olislagers, mantis #24328)

git-svn-id: trunk@24354 -
2013-04-28 13:44:57 +00:00
yury
e212901658 * ppudump: JSON output of constants, records, arrays, class refs.
git-svn-id: trunk@24333 -
2013-04-26 15:55:29 +00:00
yury
b4ba96fa5a * ppudump: JSON output of properties and global vars.
git-svn-id: trunk@24331 -
2013-04-26 10:26:42 +00:00
florian
3d7033d81e * Makefiles regenerated
git-svn-id: trunk@24325 -
2013-04-25 20:25:57 +00:00
florian
0e41df598e * merge i8086 branch by Nikolay Nikolov
git-svn-id: trunk@24324 -
2013-04-25 20:23:51 +00:00
yury
3dd976c06f * ppudump: Fixed writing of float values.
git-svn-id: trunk@24318 -
2013-04-25 10:31:45 +00:00
yury
d265e8d3be * ppudump: JSON output of classes.
git-svn-id: trunk@24317 -
2013-04-25 10:03:29 +00:00
yury
7ad68debc9 * ppudump: Work in progress on JSON output. Implemented procedure definition.
git-svn-id: trunk@24316 -
2013-04-25 06:56:38 +00:00
yury
61ac7580b7 * ppudump: Work in progress on JSON output.
git-svn-id: trunk@24311 -
2013-04-23 15:16:34 +00:00
yury
432f5059fc * ppudump:
- Use -Ft and Fj options to set the text and JSON output formats.
  - Get version string from compiler sources.

git-svn-id: trunk@24306 -
2013-04-23 09:49:41 +00:00
Jonas Maebe
c4b62f86a1 * renamed ppudump directory introduced by r24298 to ppuutils to fix
compilation on unix platforms (the ppudump binary name conflicted with
    with the directory name)

git-svn-id: trunk@24300 -
2013-04-22 14:37:37 +00:00
yury
85c2d144c5 * ppudump: Started implementation of JSON output. Output of unit header info has been implemented.
git-svn-id: trunk@24299 -
2013-04-22 14:08:53 +00:00