Commit Graph

395 Commits

Author SHA1 Message Date
florian
a4672fbd1c o based on a patch by Rika, resolves #39401:
* use Base64 (62=_, 63=$) encoded FNV hash (instead of CR-32) to shorted identifiers
    * renamed fpccrc to fpchash
    + test
2021-10-10 10:09:22 +02:00
Jonas Maebe
fcb646bc3b obcpas: fix categories implementing protocols
Allocate the ImplementedInterfaces array for them and save to/load from ppu

Solves #39375
2021-09-25 16:15:45 +02:00
pierre
4483343d00 Return -1 if size of file is smaller tham header size in tppufile.readheader method
git-svn-id: trunk@49476 -
2021-06-04 21:15:46 +00:00
svenbarth
6160abe37e * have the generic dummy symbols for procsyms keep track of their overloaded generic procsyms so that they can be easily found (will be needed for implicit specializations)
git-svn-id: trunk@48096 -
2021-01-06 12:57:59 +00:00
pierre
9901a11d22 Add internalerror when V_Error level is used in Test_double_checksum code, only with TEST_CRC_ERROR macro set
git-svn-id: trunk@47657 -
2020-12-01 10:41:16 +00:00
pierre
8e13adad4c * Improve Test_Double_checksum with Test_Double_checksum_write CRC testing code.
Pass the three checksum arrays from ppufile to module owner,
    to be able to check that the checksums computed at the time pf ppu writing
    are compatible with the ones computed at interface level.

git-svn-id: trunk@47626 -
2020-11-28 18:32:46 +00:00
pierre
9c1c2acd64 Improve CRC_checksum testing code with -dDEBUG_UNIT_CRC_CHANGES -dTest_Double_checksum -dTest_Double_checksum_write
git-svn-id: trunk@47597 -
2020-11-25 23:40:02 +00:00
svenbarth
359ff64afd * increase PPU version so that the change of Chr() to a full intrinsic will not lead to problems
git-svn-id: trunk@47354 -
2020-11-08 22:23:09 +00:00
Jonas Maebe
312f1436b1 * changed TIDString and tsymentry.realname to TSymStr
o for TIDString: prevents shortstring -> ansistring conversions with
     -dsymansistr when looking up symbols
   o for realname: consistency with name

git-svn-id: trunk@47301 -
2020-11-03 21:34:22 +00:00
Károly Balogh
92beecb6fe * bump ppu version after r47279. it changes the ABI (m68k only), so units are incompatible even if the format didn't change
git-svn-id: trunk@47280 -
2020-11-02 02:19:06 +00:00
svenbarth
871f60ef61 * increase PPU version so that 3.2.0 correctly ignores 3.3.1 PPUs instead of fatally failing on the extended header entry
git-svn-id: trunk@45209 -
2020-05-01 13:55:01 +00:00
svenbarth
60345366f2 * fix for Mantis #35140: apply patch by Ryan Joseph together with some further changes by me to add support for constant parameters in generics
+ added tests

git-svn-id: trunk@45080 -
2020-04-25 22:12:35 +00:00
Jonas Maebe
2f914ee2d8 * packed tabstractvarsym.addr_taken/different_scope fields into a set
git-svn-id: trunk@43450 -
2019-11-11 09:26:51 +00:00
Jonas Maebe
ac1e0f96bd * replaced tentryfile.get/putsmall/normalset() with a common tget/putset
that expects an open array of byte, and use it for all sets
   o since all sets need to be typecasted to an array type of the appropriate
     size, we'll get a compilation error in case this needs to be done and
     that also tells us at the same time that the ppu version will need to
     be increased
  * enabled {$packset 1} for the compiler, as this is now safe with the above
    changes

git-svn-id: trunk@43407 -
2019-11-06 21:50:19 +00:00
pierre
dca8147958 Try to fix ppudump for generic/inline.
* entfile.pas: Differenciate ibsymtableoptions and ibrecsymtableoptions.
   * ppu.pas: Increase ppu unit CurrentPPULongVersion value.
   * utils/ppuutils/ppudump.pp: Add current_symtable_options variable.
     Change readsymtableoptions from procedure to function returning
     the new tsymtableoptions.

git-svn-id: trunk@42530 -
2019-07-29 16:40:58 +00:00
pierre
f2b200e4f0 Fix recordtoken writing into ppu files to allow correct
handling in cross-configuration with different endianess.

  The code has been modified to use the same scheme as the writing of
  the other parts of the ppu, i.e. change_endian filed has been
  added also to tscannerfile class of scanner unit.
  This field is then used to swap values that required endianess
  conversion.

  * scanner.pas: change_endian filed added to tscannerfile class.
    The value of this field is set as the same field in tentryfile class of entfile unit.
    Token read and write methods converted to use change_endian field.

  * ppu.pas: Increase CurrentPPILongVersion

  * utils/ppuutils/ppudump.pp: Remove unneeded FPC_BIG_ENDIAN code
    which was needed because tokens were previously written using a
    different rule.

git-svn-id: trunk@42527 -
2019-07-29 05:33:00 +00:00
svenbarth
900fd35f4a * increase PPU version now that all generic procdefs store their local symtables
git-svn-id: trunk@42460 -
2019-07-19 15:58:42 +00:00
svenbarth
b945e66e28 * store attribute information in PPU; this is less important for the compiler, but more for e.g. Lazarus when dealing with binary only units
* increase ppu version
+ added test
* adjust ppudump to handle attributes as well
ToDo: output parameter nodes as well

git-svn-id: trunk@42401 -
2019-07-12 22:07:46 +00:00
pierre
d8b89432a2 * Set ControllerSupport to false for sparc/sparc64 and x86_64 CPUs.
This boolean must only be set to true if TControllerType is not simply (ct_none)
  * ppu.pas: Increment CurrentPPULongVersion constant as the above modification
    changes the number of fields of the TSettings record that is saved to
    PPU in ST_LOADSETTINGS field.

git-svn-id: trunk@42323 -
2019-07-04 15:24:49 +00:00
Jonas Maebe
a0e35fd1bc * synchronised with trunk till r42118
git-svn-id: branches/debug_eh@42119 -
2019-05-25 13:19:06 +00:00
pierre
dd418f24b5 Add DEBUG_PPU conditional code to be able to debug ppu changes (only useful for debugging purposes)
git-svn-id: trunk@42110 -
2019-05-20 12:48:12 +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
927fbc4387 * documented usage of ppuversion and ppulongversion
git-svn-id: trunk@41865 -
2019-04-13 14:58:15 +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
170ec00348 - removed withnode (was no longer used since a very long time)
git-svn-id: trunk@40777 -
2019-01-05 22:28:37 +00:00
Jonas Maebe
95d79296bd * fixed alignment of tfiledef (same as corresponding file recorddef)
* cap set alignment to sizeof(aint)

git-svn-id: trunk@40442 -
2018-12-01 23:07:05 +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
Jonas Maebe
0cd85d73e4 * ttryfinallynode now inherits from tbinarynode instead of tloopnode, as its
t1 field was always set to tnothingnode

git-svn-id: trunk@40142 -
2018-11-01 13:19:33 +00:00
svenbarth
ba08bdc9b1 * increase PPU version after the addition of the field to keep track of management operators (don't seperately to help merging)
git-svn-id: trunk@39710 -
2018-09-03 18:00:30 +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
539d4cb68a + introduced taddrnodeflags (empty for now)
git-svn-id: trunk@38667 -
2018-04-03 14:33:41 +00:00
Károly Balogh
e9ca615924 r38636 changed the PPU format, but didn't bump the version. lets bump
git-svn-id: trunk@38639 -
2018-03-27 19:54:48 +00:00
nickysn
2cee948b72 + support segment overrides in inline asm references to local variables or parameters on x86
git-svn-id: trunk@38392 -
2018-03-01 17:59:57 +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
nickysn
2af5c9d508 * changed type used for section alignment from byte/shortint to longint, so the
internal object writer and the internal linker support object files with
  sections with alignment >=256

git-svn-id: trunk@37518 -
2017-10-25 15:47:29 +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
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
florian
a37237ca11 * avoid range check errors with absolute symbols for cpus where addresses are bigger than the registers
git-svn-id: trunk@36361 -
2017-05-28 08:59:53 +00:00
nickysn
efc5e339d0 * use an enum instead of integer constants to represent inline numbers
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
  their enum name, instead of number

git-svn-id: trunk@36174 -
2017-05-10 14:41:43 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
maciej-izak
15ba9b54c6 Store informations about management operators in ppu files for records.
ppu.pas:
  * increase ppu version

symconst.pas:
  + new enum tmanagementoperator and set tmanagementoperators

symtable.pas, trecordsymtable:
  + new field managementoperators
  + new method includemanagementoperator

symdef.pas, trecorddef.ppuload and trecorddef.ppuwrite:
  * save/load for managementoperators

git-svn-id: trunk@35439 -
2017-02-18 18:43:25 +00:00
Jonas Maebe
7911cc8437 - removed some dataconstn remenants
git-svn-id: trunk@35314 -
2017-01-16 21:27:20 +00:00
Károly Balogh
8c4e5e0610 bump PPU version due to the latest syscall changes
git-svn-id: trunk@35048 -
2016-12-03 19:01:11 +00:00
Károly Balogh
657aa06360 arm: arm-aros syscall support
git-svn-id: trunk@34809 -
2016-11-06 14:31:42 +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
3360410c35 Fix cycling with -dTest_Double_checksum option
git-svn-id: trunk@34570 -
2016-09-28 08:56: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
deda4c8247 simplified some code and removed a no longer used const
git-svn-id: trunk@34378 -
2016-08-26 10:07:30 +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