Commit Graph

66439 Commits

Author SHA1 Message Date
Jonas Maebe
29bae2297f tcginnode.pass_generate_code: use tlhcgobj.g_undefined_ok
Also override the code that uses this for LLVM with a variant that does not
need it for LLVM versions that do not support the freeze instruction.
2023-01-20 21:07:18 +01:00
Jonas Maebe
ab581c5c30 LLVM: override thlcgobj.g_undefined_ok
Uses the freeze instruction available in LLVM 10.0+. If we don't freeze undef/
poison values before using them in a calculation (even if that calculation is
something like "and 0", which masks the result completely), the result will
still be undef/poison and will keep propagating.
2023-01-20 21:07:18 +01:00
Jonas Maebe
ee0ad3ff86 thlcgobj.g_undefined_ok: new method
Specify that a register's contents may be undefined because of previous
operations (e.g. shifting by more bits than the register has, whose result
depends on the target architecture), but that the code generator will
later on ensure that if this is the case, that result will be overwritten/
masked.
2023-01-20 21:07:18 +01:00
Jonas Maebe
0b6942de8a llvm:a fix opaque ptr IR for Objective-C protocol
Also for interfacecom functions and properties. Fixes test/tobjc9 and
test/tobjc9b with LLVM 15.0+
2023-01-20 21:07:18 +01:00
florian
218da184e6 * patch by Rika: Improve generic CompareByte, resolves #40120 2023-01-19 22:44:25 +01:00
Michael Van Canneyt
06a7610a35 * Stream writer 2023-01-19 12:21:56 +01:00
Michael Van Canneyt
32884082e3 * Checks for directory and special directories 2023-01-19 12:21:56 +01:00
florian
55deefbab5 * do not crash on illegal with statement, resolves #40118 2023-01-18 23:03:28 +01:00
florian
5598ffc210 * x86_64: warn only on negative offsets if rsp is involed, second part of #40113
+ tests
2023-01-17 23:09:42 +01:00
Michaël Van Canneyt
b5763eb412 * Added some debugging aids 2023-01-17 14:32:38 +01:00
Michaël Van Canneyt
eb1905a607 * Correct exception handling 2023-01-16 14:02:15 +01:00
Michaël Van Canneyt
98404eab49 * Fix alias typed documentation 2023-01-16 14:02:15 +01:00
Michaël Van Canneyt
dcd7758e4c * Debug statement 2023-01-16 14:02:15 +01:00
florian
8b08486fa1 * do not warn on lea e/rsp with negative address offset, part of #40113
+ tests
2023-01-15 23:06:05 +01:00
mattias
fdea66d217 rtl: added TBinaryObjectReader.BeginComponent 2023-01-15 10:56:58 +01:00
florian
46ab62fbb9 * alternative declaration for SDL_CreateThread added to keep old code working, resolves #40112 2023-01-14 20:59:26 +01:00
Pierre Muller
5cedecbe25 Avoid float_raise call in FPC_SOFT_FPUX80 code 2023-01-14 11:41:20 +00:00
Pierre Muller
977ca19dc0 Set current_filepos in Internal assembler class also if DEBUG macro is set 2023-01-14 11:41:20 +00:00
florian
a9dca32689 * undid accidentely activated define 2023-01-13 22:34:57 +01:00
mattias
8e63c2a6b2 Merge branch 'main' of https://gitlab.com/freepascal.org/fpc/source into main 2023-01-13 10:56:29 +01:00
florian
e77ec69de4 * avoid internal error in case of an illegal generic declaration 2023-01-12 23:05:51 +01:00
florian
51bb01734b * patch by Alfred Glänzer: Prevent install of unnecessary files during cross-install, resolves #40101 2023-01-11 22:17:27 +01:00
J. Gareth "Curious Kit" Moreton
b997e41366 * New tests that evaluate CMOVcc using a reference even if IfRefSafe returns False because the previous condition reads it 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
891723111c * New test for extended CMOVcc optimisations 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
df80d4e612 * x86: CMOV optimisations now check optimizecputype rather than cputype 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
4d57dee8d9 * x86: Extension to CanBeCMOV that permits a potentially unsafe reference if it appears in the previous comparison 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
b108608b29 * x86: New CMP optimisation that mimics some of the CMOV optimisations and removes unnecessary conditions. 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
bab60d819f * x86: Refactored CMOV optimisations and permitted the use of constants in some cases. 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
5f3749dc49 * x86: Introduced TrySwapMovOp method, and redesigned TrySwapMovCmp
to use it while also trying to move one more instruction back
2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
6af886c2b9 * Removed foolish inline from StripLabelFast 2023-01-10 22:23:58 +00:00
J. Gareth "Curious Kit" Moreton
5cdef8050b * Fixed bug in register preservation tracking 2023-01-10 22:23:58 +00:00
wsherman
6453af40d8 *fix compile warnings and hints in googleapiconv and googlediscoverytopas
- Fix compiler warnings and hints and unused local variables
  - Change deprecated ClassHeader to ClassComment
  - Fix comment in helper script
2023-01-09 23:48:05 -08:00
wsherman
cf50f8ede0 * More fixes and cleanups in restbase.pp (googleapiconv)
- Move test functions out of class to local procedures and into
    {$IFDEF DUMPARRAY} and change the parameters to match the rtl versions:
      function GetDynArrayProp(P: PPropInfo) : Pointer; virtual;
      procedure SetDynArrayProp(P: PPropInfo; AValue : Pointer); virtual;
  - Add dyn arrays support to the ClearProperties method
  - In SetArrayProperty, fix previous commit (fba7595b) because the
      array properties were not being set and make the dyn array handling
      code more typesafe.
  - In SetObjectProperty use TObjectArray instead of Pointer to make the
      dyn array handling code more typesafe.
  - In ClearChildren use ClearProperty to do the work and simplify the code.
  - Fix some compiler warnings and hints.
2023-01-09 23:48:05 -08:00
florian
f4d9082028 * copyright for 2023 updated 2023-01-09 22:54:46 +01:00
Rika Ichinose
30e3d93d57 Make generic Index* faster and denser. 2023-01-09 21:26:00 +00:00
Karoly Balogh
3cea1706e9 m68k: more work on instruction validation for the internal assembler 2023-01-09 12:01:10 +01:00
Karoly Balogh
69761839c0 m68k: removed the unused S_IQ opsize 2023-01-09 12:01:10 +01:00
Pierre Muller
0641ea33d1 Both _STAT_VER_KERNEL and _STAT_VER_LINUX are equal to zero for aarch64-linux 2023-01-09 10:29:38 +01:00
Michaël Van Canneyt
00e3cdddce * Add NetAddrIsPrivate function from Ondrej Pokorny 2023-01-09 09:37:23 +01:00
Ondrej Pokorny
f43912a383 add SSL functions 2023-01-09 07:17:04 +00:00
wsherman
b56ebfa93d * Remove conditional code for compiling googleapiconv with v2.6.4 on i386
(restbase.pp)
  - Remove {$ifdef ver2_6} directives and associated code
  - Remove {$ifndef ver2_6} directives (but keep code)

(googleapiconv.pp)
  - Remove {$ifdef ver2_6} directives and associated code
  - Remove synapse defines and associated code line

(googlediscoverytopas.pp)
  - Remove {$ifdef ver2_6} directives and associated code
2023-01-08 21:38:38 -08:00
florian
0b45cd95f7 + introduce long forms for $E, $F and $S, resolves #39889 2023-01-08 21:29:31 +01:00
mattias
ea4768456f rtl: ObjectBinaryToText, ObjectTextToBinary: support unitname/classname 2023-01-08 20:30:52 +01:00
mattias
c1f3960388 rtl: added overload GetClass(UnitName,ClassName), implemented UnregisterClass, overload TStream.WriteComponent(Instance,WriteUnitName) 2023-01-08 15:46:49 +01:00
wsherman
ed894b40c9 * minor updates to googleapiconv helper scripts (ref #40094) 2023-01-08 00:33:07 -08:00
wsherman
3224f2c8b5 * more fixes to googleapiconv (ref #40094)
(googlediscoverytopas)
  -Fix unit clause and "uses" for generated units

(googleapiconv)
  -Add --version parameter
  -Fix logging messages
  -Set OutputUnitName so units have correct clause

(restbase)
  -Add #todo notes for follow up
  -Move function RFC3339ToDateTime next to related functions
2023-01-08 00:33:07 -08:00
wsherman
731fd94b8c * bash scripts for testing and running googleapiconv (ref #40094) 2023-01-08 00:33:07 -08:00
wsherman
ab3aae149b * googleapiconv fixes and cleanup (ref #40094)
- Add updated URL for google api discovery
  - Fix incorrect usage / help messages and put options in alpha order
  - Replace "with .. do" statement with a local variable for clarity
  - Add missing DiscoveryJSONToPas.Execute so output files are not empty
  - Add FreeAndNil(Application) to clear a memory leak
    (it now has a clean Heaptrc)
  - Minor fix to .lpi file which had incorrect dependency.
2023-01-08 00:33:07 -08:00
wsherman
fba7595bb1 * Fix dynamic array (managed types) handling in restbase.pp (Ref #40094)
Fixes code in method TBaseObject.SetArrayProperty
  and removes private method SetArrayElements

  This fixes AVs and memory leaks.
2023-01-08 00:30:51 -08:00
florian
4deb23ba58 * makefile regenerated with current fpcmake, resolves #40092 2023-01-07 22:52:01 +01:00