Commit Graph

181 Commits

Author SHA1 Message Date
yury
95ea5d87dd * Fixed int to int conversion in ARM code generator.
+ Added new test to detect more bugs in int to int conversion.

git-svn-id: trunk@10691 -
2008-04-18 11:31:12 +00:00
yury
ec943198fd * Properly fill treference.alignment when variable is loaded by tcgloadnode. It allows code generator to insert unaligned handling if needed.
* Improved generic a_load_ref_reg_unaligned if ref alignment is 2.
* Improved unaligned load/store of register for ARM.
* It fixes passing records by value on ARM.
+ New test.

git-svn-id: trunk@10681 -
2008-04-16 23:01:20 +00:00
yury
cf235145cb * Fixed a_load_reg_reg for arm.
* Fixed sign/zero-extension in second_int_to_bool for all CPUs. x86 and pppc were not affected by this bug, but I fixed it for all CPUs for consistency.
* cg/tcnvint1 is passed on arm now.

git-svn-id: trunk@10669 -
2008-04-15 20:44:27 +00:00
micha
6910b0ed40 * fix arm(eb) load/store of smaller than register sizes
git-svn-id: trunk@10500 -
2008-03-17 21:27:44 +00:00
Jonas Maebe
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
florian
1e618b499d * fixes unaligned load_ref_reg on little endian arm
git-svn-id: trunk@8972 -
2007-10-28 15:30:50 +00:00
florian
00d6a03b2c + default code now preserves mm registers
* save|restore_standard_registers => save|restore_registers

git-svn-id: trunk@8954 -
2007-10-27 12:02:28 +00:00
micha
bae0251549 * fix big endian arm loading (fixes issue #8752)
git-svn-id: trunk@8862 -
2007-10-20 14:31:08 +00:00
peter
9f0ca44c94 * new tf_smartlink_library flag
* use create_smartlink[_sections|_library] to check what to 
    do for smartlinking

git-svn-id: trunk@8715 -
2007-10-01 16:55:08 +00:00
florian
b984b2227f * improved constant loading for arm
git-svn-id: trunk@8429 -
2007-09-11 19:28:48 +00:00
yury
bd0cafd545 * fixed ARM stackframe optimization when float registers are used.
git-svn-id: trunk@8032 -
2007-07-12 21:55:34 +00:00
florian
eb8b2fb138 * be more carefull with unaligned load optimization
git-svn-id: trunk@6356 -
2007-02-07 17:43:56 +00:00
florian
35b9bfc83e * several range check errors fixed
git-svn-id: trunk@6324 -
2007-02-03 19:36:06 +00:00
florian
01b23ca896 * improved last commit
git-svn-id: trunk@6309 -
2007-02-02 22:47:29 +00:00
florian
d0b34fef46 * safe an loadaddr for simple references when generating unaligned accesses
git-svn-id: trunk@6308 -
2007-02-02 22:43:30 +00:00
florian
c16c124562 * handle pc relative offsets in ldf/stf correctly
git-svn-id: trunk@6115 -
2007-01-21 22:55:12 +00:00
Jonas Maebe
e815b923d5 * a_loadfpu_* gets two size parameters: fromsize and tosize
* fixed downsizing the precision of floating point values
  * floating point constants are now treated using only the minimal
    precision required (e.g. 2.0 is now a single, 1.1 extended etc)
    (Delphi compatible)

git-svn-id: trunk@5927 -
2007-01-12 18:33:51 +00:00
yury
2a274aa510 * fixed tbs/tb0350.pp.
* removed unused local variables.

git-svn-id: trunk@5667 -
2006-12-21 21:18:38 +00:00
yury
c427fcf902 * fixed register to register conversion for ARM.
git-svn-id: trunk@5537 -
2006-12-03 22:01:33 +00:00
yury
d4335749ec * reverted r5481. That order of instructions can be executed more effectively on newer ARM CPUs.
git-svn-id: trunk@5484 -
2006-11-26 11:42:29 +00:00
florian
01a20b25a2 * don't reuse registers
git-svn-id: trunk@5483 -
2006-11-26 11:11:14 +00:00
yury
35b1014207 * more usual order of instructions.
git-svn-id: trunk@5481 -
2006-11-26 10:06:12 +00:00
yury
135c0ecfb7 * fixed passing float constants as part of "array of const" parameter for ARM.
git-svn-id: trunk@5403 -
2006-11-16 17:01:17 +00:00
florian
3f77637b56 * set is_jmp flag correctly
git-svn-id: trunk@5399 -
2006-11-16 09:43:58 +00:00
yury
8abe2d365e * Implemented stackframe optimization for ARM CPU.
git-svn-id: trunk@5374 -
2006-11-14 16:18:49 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
florian
922de0bc8d * fixed wrong load_ref_ref
git-svn-id: trunk@5092 -
2006-10-30 11:48:37 +00:00
florian
67ba76f090 * several arm fixes
git-svn-id: trunk@4742 -
2006-09-27 21:05:05 +00:00
florian
e08bf34689 * stack page initialization disabled, not necessary according to Yury Sidorov
git-svn-id: trunk@4539 -
2006-09-02 20:43:59 +00:00
florian
7145eeb4b9 * bugs in wince stack initialization fixed
git-svn-id: trunk@4517 -
2006-08-29 19:32:40 +00:00
florian
e08a24562c * experimental wince stack initialization fix
git-svn-id: trunk@4516 -
2006-08-29 16:01:52 +00:00
yury
0018d7b920 * final fix for overflow checking for ARM.
git-svn-id: trunk@4103 -
2006-07-06 18:54:19 +00:00
yury
0c396ad3da * proper fix for rev. 4097.
git-svn-id: trunk@4099 -
2006-07-06 12:23:29 +00:00
yury
76921030e9 * fixed bug #6079 for ARM CPU.
git-svn-id: trunk@4097 -
2006-07-06 10:27:23 +00:00
florian
bbc42e8503 * made ie unique
git-svn-id: trunk@3737 -
2006-05-29 19:50:12 +00:00
florian
30e7d87c11 * fixed loading of floating point constants
git-svn-id: trunk@3667 -
2006-05-25 09:57:07 +00:00
florian
2ddd617971 * fixed stm/ldm for usage with large temp. areas
git-svn-id: trunk@3633 -
2006-05-22 21:00:55 +00:00
florian
8bd674af24 * another patch from Roozbeh GHolizadeh
* improved concatcopy code generation
  * improved constant loading
  * improved multiplication code generation

git-svn-id: trunk@3471 -
2006-05-10 20:07:29 +00:00
florian
fa03ab8fe5 * fixed arm compiler by adding a_call_ref
git-svn-id: trunk@3416 -
2006-05-03 13:53:40 +00:00
florian
09ad199450 * cleanup and bug fixing of unaligned data handling code by Roozbeh GHolizadeh
git-svn-id: trunk@3377 -
2006-04-30 08:07:29 +00:00
florian
13493a5355 * fixed copying of unaligned value parameters
git-svn-id: trunk@3369 -
2006-04-29 20:13:57 +00:00
florian
053bff4295 + improved concatcopy from Roozbeh GHolizadeh
git-svn-id: trunk@3355 -
2006-04-29 13:12:48 +00:00
florian
0780616dee + unaligned load/store support from Roozbeh GHolizadeh
git-svn-id: trunk@3351 -
2006-04-29 11:44:44 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
florian
1b5e2b67b1 * compilation fixed
git-svn-id: trunk@2947 -
2006-03-17 21:16:15 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
florian
dae84f282f * fixed handling of doubles in softemu mode if they are split between register and memory
git-svn-id: trunk@2047 -
2005-12-24 17:43:57 +00:00
florian
12a1449884 * ldf*/stf* can handle only offsets with max. +/- 1020, so generate never a pc relative symbol
git-svn-id: trunk@1649 -
2005-11-04 23:56:06 +00:00
florian
cf3c9bdcad * a_jmp_always fixed, it doesn't generate a new symbol anymore
git-svn-id: trunk@1534 -
2005-10-19 14:38:30 +00:00
peter
a3ab2053c9 * support multiple asmlabel types, renamed getlabel to
getjumplabel and added type para to getlabel for specific types
  * moved lineinfo generation from assemble and aggas to dbgstabs

git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
florian
d280ed6e8b * continued to work on arm binary writer, started to fix operand matching
git-svn-id: trunk@1073 -
2005-09-11 10:01:54 +00:00
florian
adb193497d + softfloat support for wince
* more units are build for wince

git-svn-id: trunk@959 -
2005-08-28 12:40:43 +00:00
florian
c15f720867 * fixed passing of floats for cdecl procedures/functions
git-svn-id: trunk@726 -
2005-07-21 20:12:28 +00:00
florian
94b97e8898 * loading of references with small offsets fixed
git-svn-id: trunk@575 -
2005-07-03 16:27:11 +00:00
peter
c1b2e1aac5 * check function/procedure type when adding a proc definition
git-svn-id: trunk@546 -
2005-06-30 14:56:05 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
Jonas Maebe
ec959955bd * fixed generic jumps optimizer and enabled it for ppc (the label table
was not being initialised -> getfinaldestination always failed, which
    caused wrong optimizations in some cases)
  * changed the inverse_cond into a function, because tasmcond is a record
    on ppc
  + added a compare_conditions() function for the same reason
2005-02-26 01:26:59 +00:00
florian
8305aa8781 * fixed storing of floating point registers for procedures with large temp. area
* fixed int64 comparisation
2005-02-16 22:02:26 +00:00
florian
f3b711d3bf * don't generate overflow results if they aren't necessary
* fixed op_reg_reg_reg_reg on arm
2005-02-15 19:53:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
florian
22d9294ab3 + overflow checking for the arm 2005-02-13 18:55:19 +00:00
florian
bd31b225a0 * fixed compilation of arm compiler 2005-01-30 14:43:40 +00:00
florian
eca0cb266f * not operator for byte/word fixed 2005-01-04 21:00:48 +00:00
florian
468eca38bd * load_reg_reg fixed 2005-01-04 20:15:05 +00:00
florian
6ab9be6a5d * implemented nostackframe calling convention directive 2005-01-04 15:36:32 +00:00
florian
e2ec30866a * fixed OP_SUB for negative constants fitting in the shifter 2004-11-06 15:18:57 +00:00
florian
73c30d6579 * fixed arm compilation with cgutils
* ...
2004-11-01 17:41:28 +00:00
florian
7f20bc1c96 * fixed ie with pi_do_call 2004-10-31 16:47:43 +00:00
florian
36ca15cf07 * fixed compilation of system unit on arm 2004-10-31 16:04:30 +00:00
florian
c8d7f6be2b * another couple of arm fixed 2004-10-31 12:37:11 +00:00
florian
410d01458c * fixed several arm compiler bugs 2004-10-24 17:32:53 +00:00
peter
2ee2004032 * fixed compilation with removed loadref 2004-10-24 11:53:45 +00:00
florian
60f0434585 * fixed compilation of arm compiler 2004-10-24 07:54:25 +00:00
peter
8b3e00244f * length parameter for copyvaluearray changed to tlocation 2004-10-11 15:46:45 +00:00
florian
5062c04096 * fixed problem with cpu interferences 2004-07-03 19:29:14 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
florian
6e4b98f913 * concatcopy with len=0 exits now immediatly 2004-03-31 19:13:04 +00:00
florian
aae508c277 + arm floating point register saving implemented
* hopefully stabs generation for MacOSX fixed
  + some defines for arm added
2004-03-29 19:19:35 +00:00
florian
9594866b30 * optimized mul code generation 2004-03-14 21:42:24 +00:00
florian
16366a944c * spilling problem fixed
* handling of floating point memory references fixed
2004-03-14 16:15:39 +00:00
florian
164a5bb1d4 + fixed code generation for cmn 2004-03-10 22:35:40 +00:00
florian
10e765329d * fixed arm compilation
* cleaned up code generation for exported linux procedures
2004-03-06 20:35:19 +00:00
olle
4fecc1a56f * big transformation of Tai_[const_]Symbol.Create[data]name* 2004-03-02 00:36:32 +00:00
peter
8c5b0f7d82 * first try to get cpupara working for x86_64 2004-02-04 22:01:13 +00:00
florian
ff303ba334 * handling of floating point references fixed 2004-01-29 17:09:32 +00:00
florian
de4fa4e7e7 * fixed another couple of arm bugs 2004-01-28 15:36:46 +00:00
florian
c77ec09d49 * fixed code generation for math inl. nodes
* more code generator improvements
2004-01-27 15:04:06 +00:00
florian
35110d8ef5 * fixed several arm issues 2004-01-26 19:05:56 +00:00
florian
8d335b9466 * fixed some spilling stuff
+ not(<int64>) implemented
  + small set comparisations implemented
2004-01-24 20:19:46 +00:00
florian
0bb8e3912f * fixref fixed if index, base and offset were given 2004-01-24 01:33:20 +00:00
florian
e7aba71412 * fixed several issues with flags 2004-01-22 20:13:18 +00:00
florian
3ab069324a * op_const_reg_reg with OP_SAR fixed 2004-01-22 02:22:47 +00:00
florian
703af0f1f4 * improved register usage
+ implemented second_cmp64bit
2004-01-22 01:47:15 +00:00
florian
af3d31eceb * fixed handling of max. distance of pc relative symbols 2004-01-21 19:01:03 +00:00
florian
3b21b99111 * fixed register allocator problems with concatcopy 2004-01-21 15:41:56 +00:00
florian
75e2de9f2c + reintroduce implemented 2004-01-21 14:22:00 +00:00