Commit Graph

50969 Commits

Author SHA1 Message Date
Károly Balogh
346f040a54 also try to inline 32bit SwapEndian variants, as they're still reasonably simple
git-svn-id: trunk@36304 -
2017-05-23 07:32:54 +00:00
Károly Balogh
a4c40a51ff m68k: also add options.pas to the previous change
git-svn-id: trunk@36303 -
2017-05-23 00:18:13 +00:00
Károly Balogh
3e8ee48458 m68k: define cpurox and enabled the rotate-related optimizations on CPUs which support rotate instructionsoptions.pas
git-svn-id: trunk@36302 -
2017-05-23 00:16:29 +00:00
joost
d5087df6fb * Undo all changes in the test-environment before each test
git-svn-id: trunk@36301 -
2017-05-22 21:56:35 +00:00
joost
408cae639f * Moved all logic to determine in which repository to install a package into
one method.
 * Re-designed the logic to determine where to install packages. Documented 
   the logic in repositorylogics.dia.
 * Partly implemented this new logic.
 * Added tests.

git-svn-id: trunk@36300 -
2017-05-22 21:20:22 +00:00
pierre
53bfafa290 Add information about MCB to SysAlloc call if DEBUG_TINY_HEAP macro is defined
git-svn-id: trunk@36299 -
2017-05-22 20:42:33 +00:00
pierre
e092f00843 Avoid trying to use invalid instruction exception if Test8087 is below 2, as older CPU ignore simply invalid instructions
git-svn-id: trunk@36298 -
2017-05-22 20:41:36 +00:00
pierre
0f80603dae + SysGetMem: Add DEBUG_TINY_HEAP message after SysAlloc call.
* Change InternalTinyAlign procedure:
  Change variable ASize to be VAR parameter type
  so that possible size reduction required by alignment
  is propagated correctly to calling function.

git-svn-id: trunk@36297 -
2017-05-22 20:27:08 +00:00
yury
376174d7ac * pas2jni: Fixed error handling of ppudump.
git-svn-id: trunk@36296 -
2017-05-22 15:35:17 +00:00
yury
884cb758e7 * Ensure the number of operands is 2 for MOVXX instructions in OptPass1MOVXX. Otherwise the classic MOVSD/W/B no-operand instructions (REP MOVSX) cause AV during checks of operands. The AV is thrown when trying to compile ucomplex.pp with -Cfsse3.
* Also fixed generation of debug comments in OptPass1MOVXX.

git-svn-id: trunk@36295 -
2017-05-22 15:20:18 +00:00
marco
5eb0506be7 * added two gtk constants, mantis #31566, patch by "MiniApp"
git-svn-id: trunk@36294 -
2017-05-22 14:27:28 +00:00
marco
f0a02cdaf9 * reengineered utf8-less fix for #0031257
git-svn-id: trunk@36293 -
2017-05-22 13:58:43 +00:00
yury
f37613ddd8 * Use .rodata and .data.rel.ro sections for Android with PIC.
git-svn-id: trunk@36292 -
2017-05-22 13:40:48 +00:00
Károly Balogh
1f7b6fbd9a m68k: implement frac inline nodes
git-svn-id: trunk@36290 -
2017-05-21 21:13:02 +00:00
Károly Balogh
7ed9b9f188 m68k: instead of the FPU, use CPU instructions to copy cgparas to stack
git-svn-id: trunk@36289 -
2017-05-21 21:09:47 +00:00
Jonas Maebe
744facb7fc * properly support accepting register parameters of assembler routines in
the intel assembler reader: no longer parse them as register tokens,
    but as local operands that are later converted into registers. This
    ensures in particular that the type of the operand is set, which is
    necessary in case this operand later subscripted (as in tasm10a)

git-svn-id: trunk@36288 -
2017-05-21 20:17:15 +00:00
Jonas Maebe
61af0fb72d * only take into account the location of the parameter at the callee side to
determine whether it's in a register if it's a pure assembler routine
  * you can't "index" implicit pointers either using their fields

git-svn-id: trunk@36287 -
2017-05-21 20:17:11 +00:00
joost
2f72f67f11 * TFPPackage.GetDebugName now also works when the package is not assigned
git-svn-id: trunk@36286 -
2017-05-21 16:10:53 +00:00
florian
358bfb4858 * SSE4.1+ implementation of int(...)
git-svn-id: trunk@36285 -
2017-05-21 15:28:34 +00:00
florian
3c5ec4e76c * allocate register correctly for "MovMov2Mov 2"
+ more debug messages
* debug message naming fixed

git-svn-id: trunk@36284 -
2017-05-21 15:06:22 +00:00
florian
69f41a776e * jump-free Ceil*/Floor* implementations
git-svn-id: trunk@36283 -
2017-05-21 12:34:31 +00:00
florian
12dec14859 * try to break dependency chains when generating vsqrt instructions
git-svn-id: trunk@36282 -
2017-05-21 11:35:33 +00:00
florian
8eec29b139 + enable support for a processor specific frac function
* implemented inlined frac support for CPUs with SSE4.1+

git-svn-id: trunk@36281 -
2017-05-21 11:12:59 +00:00
florian
912e6d129a * fix modification flags for *ROUND*
git-svn-id: trunk@36280 -
2017-05-21 11:12:57 +00:00
florian
1ffdf02b94 + Ch_*Op4
+ op_const_reg_reg_reg

git-svn-id: trunk@36279 -
2017-05-21 11:12:55 +00:00
pierre
a8ef8c852d Put fpcsubarch-fpcmemorymodel directory search before general directories for i8086 CPU
git-svn-id: trunk@36278 -
2017-05-21 09:02:57 +00:00
florian
54b5112284 * real constants should be propagated during inline expanding
git-svn-id: trunk@36277 -
2017-05-21 08:34:47 +00:00
florian
ddfaf59626 * fix compilation with -Cr
git-svn-id: trunk@36276 -
2017-05-21 08:34:42 +00:00
Jonas Maebe
e4dbd24a49 + inline trunc() support for the LLVM backend when using -Oofastmath (because
the behaviour of LLVM's fptosi instruction is undefined in case of
    overflow)

git-svn-id: trunk@36275 -
2017-05-20 19:28:15 +00:00
michael
a5f22c92db * Patch from Alfred to implement flat extraction
git-svn-id: trunk@36274 -
2017-05-20 10:26:23 +00:00
marco
86cea6b3ef * add glVertexAttribDivisor, mantis #31878, patch by Julian Puhl
git-svn-id: trunk@36273 -
2017-05-20 10:21:37 +00:00
pierre
8a7de4a4d3 Add calls to FPC_HANDLE_I8086_ERROR and add handlers for interrupt $10 and $75
git-svn-id: trunk@36271 -
2017-05-19 22:06:37 +00:00
pierre
ec0dfdc245 Regenerated after: Add unicode related units
git-svn-id: trunk@36270 -
2017-05-19 22:02:29 +00:00
pierre
86d0cfb75e Add unicode related units
git-svn-id: trunk@36269 -
2017-05-19 22:02:01 +00:00
pierre
50e5256f8e * system.pp:
+ Add MSDOS specific version of SysInitFPU, using Get/SetInterrput Vectors
    to test coprocessor presence.
    * Do not call SetupEnvironment in startup code.
    + Add internal_envp variable (nil by default).
    + Change envp to function, which calls SetUpEnvironment,
    if internal_envp is nil.
    * Do not call SetupArguments at startup,
    instead call it from inside paramcount or paramstr
    + Add SaveInt10 and SavdeInt75

  * dos.pp: Also swap Interrupt vectors $10 and $75

  * sysutils.pp: Adapt to envp change in system unit.

git-svn-id: trunk@36268 -
2017-05-19 22:01:12 +00:00
Jonas Maebe
9787c5dd82 * fix compilation of LLVM backend (mantis #31794)
git-svn-id: trunk@36267 -
2017-05-19 21:52:49 +00:00
Jonas Maebe
6dca851cb2 * set default LLVM version to 3.9.0
git-svn-id: trunk@36266 -
2017-05-19 21:52:45 +00:00
Jonas Maebe
f3ebde999f * extracted the code to generate the indirect symbols from
finalize_asmlist() into its own method. finalize_asmlist() must not
    generate new data, as it is /the/ method that gets overridden by
    descendent classes to generate the symbol data in the format needed
    by the platform
   o fixes generation of indirect symbol data for LLVM

git-svn-id: trunk@36265 -
2017-05-19 21:52:42 +00:00
Jonas Maebe
04ac44cd37 - removed dependency of hlcgllvm on llvmpara, so that cpupara no longer
indirectly depends on llvmpara and hence is initialised after instead
    of before it (since llvmpara should override cpupara in its init code)

git-svn-id: trunk@36264 -
2017-05-19 21:52:37 +00:00
pierre
277f1c1c2d Check if FPC_SYSTEM_HAS_SYSINITFPU before parsing generic i8086 code
git-svn-id: trunk@36263 -
2017-05-19 21:49:13 +00:00
pierre
8ebac8ed52 Add Handle_I8086_Error procedure
git-svn-id: trunk@36262 -
2017-05-19 21:47:26 +00:00
pierre
301ed6d9b7 Fix debug code on successful int 0x21 function ax=0x4800
git-svn-id: trunk@36261 -
2017-05-19 21:30:14 +00:00
pierre
ae349a3ccc Handle second argument to -Ch option, -Chx,y y is max heap size
git-svn-id: trunk@36260 -
2017-05-19 21:28:24 +00:00
pierre
5c18830aab Regenerated files after: Add help for second argument to -Ch option, -Chx,y y is max heap size
git-svn-id: trunk@36259 -
2017-05-19 21:27:43 +00:00
pierre
22021dd0b8 Add help for second argument to -Ch option, -Chx,y y is max heap size
git-svn-id: trunk@36258 -
2017-05-19 21:27:08 +00:00
svenbarth
d311881b34 * extract calculation of unit init/fini entries into separate method get_init_final_list() so that it can be used by the AVR code as well
git-svn-id: trunk@36257 -
2017-05-19 16:12:22 +00:00
nickysn
720ac63a28 + preserve the node fileinfo and verbosity properties from the previous
assignment node when applying the optloadmodifystore node transformations.
  This keeps the source line info intact in the -al asm output (and probably
  makes the optimization debugger friendly, although this isn't tested and not
  at all guaranteed for all the other -O3 level optimizations)

git-svn-id: trunk@36256 -
2017-05-19 15:40:48 +00:00
pierre
d46c8886de Do not set InOutRes if ReturnNilIfGrowHeapFails is set in SysOSAloc
git-svn-id: trunk@36255 -
2017-05-19 15:21:58 +00:00
nickysn
751d47c568 + enable the optloadmodifystore optimization for statements such as "x:=x shl k"
and "x:=x shr k" (only enabled for i386 and x86_64 for now, since the other
  code generator backends are untested)

git-svn-id: trunk@36254 -
2017-05-19 15:21:38 +00:00
svenbarth
5f08e47d84 + add an SSE2 implementation of Frac() (the existing Trunc() and Round() implementations are also SSE2, so nothing special to keep in mind here)
git-svn-id: trunk@36253 -
2017-05-19 14:59:23 +00:00