Commit Graph

605 Commits

Author SHA1 Message Date
tom_at_work
8ca0fe382e * removed "+0" offset generation in assembler writer
git-svn-id: trunk@1714 -
2005-11-10 15:11:06 +00:00
tom_at_work
3645a69686 * added mftbu (move from timebase upper) opcode
git-svn-id: trunk@1596 -
2005-10-25 20:45:05 +00:00
Jonas Maebe
89094457c5 * pass varargs float parameters only in integer registers instead of only
in fpu registers for aix abi. Proper fix is to pass them in both, but
    at least gcc under Mac OS X only seems to use the contents in the integer
    registers currently.

git-svn-id: trunk@1576 -
2005-10-23 14:23:16 +00:00
Jonas Maebe
b458554f5b + some optimizations for comparisons with zero whereby the result has to
go to a register

git-svn-id: trunk@1379 -
2005-10-15 11:09:44 +00:00
Jonas Maebe
4558cd705e + optimize some slwi/rlwinm combos
git-svn-id: trunk@1378 -
2005-10-14 21:03:48 +00:00
Jonas Maebe
9cf0865d0e * remove a number of superfluous register moves
git-svn-id: trunk@1377 -
2005-10-14 20:34:53 +00:00
Jonas Maebe
e14d8e6611 * don't replace cmplwi's with flag-setting variants of integer operations,
as the latter perform a signed comparison with 0

git-svn-id: trunk@1365 -
2005-10-13 07:49:02 +00:00
Jonas Maebe
cd3f064a33 + enabled postpeepholeopts phase
+ optimize "integer op" followed by comparison of target register with zero
    to a variant of that integer op which sets the flags (ppc)
  + change rlwinm. instructions which do nothing but an "and" operation into
    andi./andis., since the rlwinm. is cracked on the G5 while andi./andis.
    isn't

git-svn-id: trunk@1361 -
2005-10-12 19:47:21 +00:00
Jonas Maebe
339f76182b + missing rlwnm. and not. instructions
git-svn-id: trunk@1360 -
2005-10-12 19:44:34 +00:00
Jonas Maebe
42e49ccd90 + srwi followed by slwi optimized
+ srwi followed by certain rlwinm's optimized

git-svn-id: trunk@1351 -
2005-10-10 20:43:23 +00:00
Jonas Maebe
cd93450fd6 * fixed a few bugs in yesterday's optimization
git-svn-id: trunk@1322 -
2005-10-08 11:37:18 +00:00
Jonas Maebe
ab3bc45fa4 * cpu-specific overrides of optimizer methods now get called
+ first simple rlwinm optimization for ppc

git-svn-id: trunk@1320 -
2005-10-07 21:44:00 +00:00
peter
ec4d287fd8 * aktoutputformat removed, add new paraXX vars for target
assembler and debuginfo and use these vars to override
    the defaults for the target after the parameters are read
  * remove not-maintained and tested gdb code

git-svn-id: trunk@1201 -
2005-09-25 21:17:37 +00:00
Jonas Maebe
8b8d3de3bf * finally fix for fixing up conditional jumps that are too long
git-svn-id: trunk@1161 -
2005-09-23 10:02:53 +00:00
peter
82faa95118 * lineinfo fixed for binary writer
* add tai_directive to replace old tai_direct calls
    in powerpc

git-svn-id: trunk@1139 -
2005-09-19 11:47: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
Károly Balogh
6b01da4f65 * fixed(?) peter's last commit. i hope i did it the right way.
git-svn-id: trunk@1087 -
2005-09-15 16:38:30 +00:00
peter
ca66b9f7c1 * force writing of new section before generating the jumptable
git-svn-id: trunk@1085 -
2005-09-15 14:08:02 +00:00
peter
fdc4925fcd * basic framework for debuginfo class added
git-svn-id: trunk@1084 -
2005-09-15 08:34:51 +00:00
peter
c3727c29b2 * rename al_code to al_procedures, al_bss/al_data to al_globals
* more work for section smartlinking

git-svn-id: trunk@1083 -
2005-09-15 06:51:12 +00:00
Jonas Maebe
9d877e055b * no longer create new asmsymbols in a_jmp(). Very strange that the jmp
peephole optimization worked for ppc...

git-svn-id: trunk@1079 -
2005-09-14 19:22:22 +00:00
Jonas Maebe
5637845b48 * fixed compilation after fpc_resource changes
git-svn-id: trunk@976 -
2005-08-29 13:03:58 +00:00
Jonas Maebe
fdc8c1c0ae * replace divisions by constants with a combination of mul, shift, add from
the ppc compiler writers guide
  + test program for above optimization
  (both by Thomas Schatzl)

git-svn-id: trunk@912 -
2005-08-21 18:35:15 +00:00
Jonas Maebe
97a8ea2e6d + ppc jumptable support for case statements (by Thomas Schatzl)
git-svn-id: trunk@911 -
2005-08-21 18:24:35 +00:00
Jonas Maebe
f1d3ed5225 * fixed tw3402
git-svn-id: trunk@907 -
2005-08-21 16:53:22 +00:00
Jonas Maebe
b779d6d28f * fixed fixref() (by Thomas Schatzl)
git-svn-id: trunk@904 -
2005-08-18 11:09:57 +00:00
peter
05a628447f * put typedconsts in own asmlist to prevent mixing
array and string data
  * added al_rodata
  * renamed tasmlist enum names to include al_ prefix

git-svn-id: trunk@899 -
2005-08-17 08:42:52 +00:00
florian
804207239d *c <int64>:=-<longint> fixed (bug 4253)
git-svn-id: trunk@796 -
2005-08-05 19:00:30 +00:00
daniel
e98865ab40 * Fixes and further development of fast threadvars
git-svn-id: trunk@743 -
2005-07-25 14:07:02 +00:00
daniel
4996b31df1 * Fixes compile error
git-svn-id: trunk@742 -
2005-07-25 13:07:16 +00:00
Jonas Maebe
f948a34c78 - disabled wrong GOT setup code which destroys r31 without saving it (should
have been done a long time ago already)

git-svn-id: trunk@733 -
2005-07-24 08:26:12 +00:00
daniel
d05f58b604 * Group asmlists into array to be able to add
some of them more comfortably.
  * x86_64 compilation was broken, fixed.
  * Sparc compilation was broken, fixed.

git-svn-id: trunk@731 -
2005-07-23 13:44:32 +00:00
daniel
d57c048696 * Remove ifdef 1_0
* Add expirimental 32-bit x86_64 target to systems

git-svn-id: trunk@729 -
2005-07-23 08:37:26 +00:00
Jonas Maebe
6171499d15 * fixed creating shared libraries under Darwin/Mac OS X
git-svn-id: trunk@727 -
2005-07-22 10:09:52 +00:00
Jonas Maebe
bf51ab03af + support for Mach-O in lineinfo.pp (by Jan Ruzicka)
* always store the return address in the stack frame on ppc if debuginfo
    or lineinfo is turned on (otherwise the parent of a leaf function is
    missing in backtraces)

git-svn-id: trunk@724 -
2005-07-21 13:09:45 +00:00
Jonas Maebe
8bc4e0a32f * inline and compilerproc are now procoptions instead of proccall types
(so both can be combined with each other, as well as with other calling
     conventions)
  * defined COMPPROCINLINEFIXED so SYSTEMINLINE is again activated

git-svn-id: trunk@658 -
2005-07-18 15:27:14 +00:00
Jonas Maebe
614f49355b - removed commented unused assignintreg() procedure
git-svn-id: trunk@648 -
2005-07-18 13:03:34 +00:00
Jonas Maebe
d27fa6d0b3 * fixed another missing swapleftright for subn
git-svn-id: trunk@557 -
2005-07-02 12:22:04 +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
Jonas Maebe
7356f83713 * fixed calling of external procedures if the first time they are used in a
compilation unit is in an expression which merely takes their address

git-svn-id: trunk@439 -
2005-06-18 09:06:07 +00:00
Jonas Maebe
0f8e019c44 * fixed web bug tw4078 + added test
git-svn-id: trunk@414 -
2005-06-15 16:46:03 +00:00
Jonas Maebe
af3f851751 * rgBase -> rgbase to avoid unnecessary recompiles on case-preserving/
insensitive filesystems

git-svn-id: trunk@405 -
2005-06-14 17:36:56 +00:00
Jonas Maebe
2b4d3312f7 * fixed web bug #4058 (missing swapleftright for subtraction if overflow
checking is turned on)

git-svn-id: trunk@327 -
2005-06-09 20:17:40 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
Jonas Maebe
aea6563bba * no longer change r12 when fpu regs have to saved, corrupted copying of
stack parameters coming after that

git-svn-id: trunk@130 -
2005-05-27 22:09:49 +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
bfa2301575 * const record parameters > 8 bytes are now passed by reference for non
cdecl/cppdecl procedures on Mac OS/Mac OS X to fix compatibility with
    GPC (slightly more efficient than Metrowerks behaviour below, but
    less efficient in most cases than our previous scheme)
  + "mwpascal" procedure directive to support the const record parameter
    behaviour of Metrowerks Pascal, which passes all const records by
    reference
2005-03-27 14:10:52 +00:00
Jonas Maebe
a5c94ddccd * removed some unused variables 2005-03-25 21:55:43 +00:00
Jonas Maebe
46c1b41a7b - removed unused unit 2005-02-26 15:06:26 +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
Jonas Maebe
706a87c2df * don't lose sign of ord types for register parameters 2005-02-19 14:04:14 +00:00
Jonas Maebe
6c38093871 * fixed spilling for several ppc instructions which only read registers
+ added support for registers in references that get changed (load/store
    with update)
2005-02-18 23:37:51 +00:00
Jonas Maebe
0e4f1738cd - removed a non-existing instruction (lcrxe)
* fixed an instruction (maffs_ -> mffs)
2005-02-18 23:05:47 +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
Jonas Maebe
a823a15888 * records which consist of only a union of one element have to be passed
according to record parameter passing rules, not according to the rules
    of that item's type (change relevant to AIX abi only)
2005-02-11 15:20:23 +00:00
olle
1a87bc0ff3 * fixed erroneous asm line directive 2005-02-08 22:46:00 +00:00
peter
18ebd28692 * push_addr_param must be defined per target 2005-02-03 20:04:49 +00:00
peter
f5e21ec2ff * fixed parseparaloc 2005-01-31 17:46:25 +00:00
peter
e820bc93f2 * interface wrapper generation moved to cgobj
* generate interface wrappers after the module is parsed
2005-01-24 22:08:32 +00:00
Jonas Maebe
28ea4a8fd4 * fixed bug introduced in revision 1.6 2005-01-24 18:13:46 +00:00
peter
35e466d971 * remove copy_value_on_stack and a_param_copy_ref 2005-01-20 17:47:01 +00:00
peter
04c97cc129 * load jmp_buf_size from system unit 2005-01-20 16:38:45 +00:00
peter
8d251e8506 * unit mapping rewrite
* new derefmap added
2005-01-19 22:19:41 +00:00
Jonas Maebe
52212c3fb6 * fixed overallocation of stack space for parameters under SYSV
(introduced in one of my previous commits)
  * unified code of get_volatile_registers_fpu for SYSV and AIX
2005-01-14 20:59:17 +00:00
Jonas Maebe
74cc20070d * r2 can be used by the register allocator under Darwin
* merged the initialisations of the fpu register allocator for AIX and
    SYSV
2005-01-13 22:02:40 +00:00
Jonas Maebe
8654fac06c * fixed copy_value_on_stack() for AIX abi
+ added support for passing empty record parameters
2005-01-13 19:32:08 +00:00
Jonas Maebe
9c22d594b0 + support for passing records in registers under darwin
* tcgpara now also has an intsize field, which contains the size in
    bytes of the whole parameter
2005-01-10 21:50:05 +00:00
Jonas Maebe
e0eb172f4b - removed deprecated constants 2005-01-10 21:48:45 +00:00
Jonas Maebe
7fc8f866c6 * fixed stupid tregister/tsuperregister bug (type checking circumvented
using explicit typecase), caused bug3523
2005-01-07 10:58:03 +00:00
Károly Balogh
5908985365 * more SysV call support stuff for MorphOS 2005-01-06 02:13:03 +00:00
Károly Balogh
18be2ff0fd * sysv abi also uses F0-F13 as volatile registers 2005-01-05 19:01:53 +00:00
Károly Balogh
86c111a794 * fixed SysV syscall support (MorphOS) 2005-01-05 02:31:06 +00:00
Károly Balogh
088575dc32 + sysv style syscalls added for MorphOS 2005-01-04 17:40:33 +00:00
olle
3f7fdcb45e * fixed compilation for PowerPC 2004-12-28 02:25:43 +00:00
Jonas Maebe
d377cacc61 * fixed call-by-value passing of records with size 1, 2 or 4 for AIX abi
(using a hack, normally all records should by passed by value under the
     aix abi, but that's currently impossible)
2004-12-24 15:00:11 +00:00
Jonas Maebe
067c588089 - removed unused variables 2004-12-24 11:58:33 +00:00
Jonas Maebe
4c3b9ce6c3 * fixed a_jmp_name() for darwin 2004-12-24 11:51:55 +00:00
peter
fad0e529a4 * syscall with sysv abi for morphos 2004-12-15 19:30:32 +00:00
Jonas Maebe
fcf16c4983 * fixed synchronising 64bit regvars on 32bit systems at the start and
end of procedures
  * hack for ppc for loading of paras from their callee location to local
    temps
2004-12-11 12:42:28 +00:00
Jonas Maebe
5b7ffabd0c * only set/clear bit 6 of cr in case of varargs for the sysv abi 2004-12-06 18:06:37 +00:00
Jonas Maebe
4f53d8367d * introduced bug (x shl 65 = x shl 1 when shifting with a constant, but
still 0 otherwise) to pass tshlshr
2004-12-06 17:53:43 +00:00
Jonas Maebe
49a8939b22 * modifications to work with the generic code to copy LOC_REFERENCE
parameters to local temps (fixes tests/test/cg/tmanypara)
2004-12-04 21:47:46 +00:00
Jonas Maebe
bd04491f50 * patch from Peter to fix inlining of case statements 2004-11-30 18:13:39 +00:00
Jonas Maebe
26ab4ead33 * fixed intermittent bug in overflow checking of subtractions 2004-11-26 12:30:47 +00:00
Jonas Maebe
fff0683902 * fixed overflow checking of unsigned multiplications 2004-11-26 12:17:04 +00:00
peter
8cf8c54609 * fixed varargs
* replaced dynarray with tlist
2004-11-22 22:01:19 +00:00
peter
89b1b583c9 * ttempcreatenode.create_reg merged into .create with parameter
whether a register is allowed
  * funcret_paraloc renamed to funcretloc
2004-11-21 17:54:59 +00:00
florian
18f7aa97dd * changed funcret location back to tlocation 2004-11-21 17:17:03 +00:00
peter
4d8460ec2f * float routines all use internproc and compilerproc helpers 2004-11-21 15:35:23 +00:00
peter
e740a66636 * tparaitem removed, use tparavarsym instead
* parameter order is now calculated from paranr value in tparavarsym
2004-11-15 23:35:30 +00:00
florian
60e0494a74 * fixed morphos syscall 2004-11-14 16:26:29 +00:00
peter
0c7e53bb81 * fixed compile of powerpc,sparc,arm 2004-11-11 19:31:33 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
olle
8763a9166a + Change of the way global variables, with multiple entrypoints,
are referenced, fixes a lot of failed tests
2004-10-31 15:32:13 +00:00
Jonas Maebe
e737e39888 * fixed bugs due to change of the value field of tlocation from aword to
aint
2004-10-26 18:22:31 +00:00
Jonas Maebe
0a32b9a526 * fixed tlocation record again for big endian
* fixed (currently unused) saved_standard_registers array
2004-10-26 18:22:04 +00:00
Jonas Maebe
c0b4a9026c + empty g_save_standard_registers/g_restore_standard_registers overrides
(their work was/is done by g_proc_entry/g_proc_exit, and the generic
     version saves the registers in the wrong place)
2004-10-26 18:21:29 +00:00
peter
d19663f3a8 * save standard registers moved to tcgobj 2004-10-25 15:36:47 +00:00