Commit Graph

367 Commits

Author SHA1 Message Date
peter
d03fd8f7e0 * operand order of cmp fixed 2003-07-06 22:10:13 +00:00
peter
d0e4a452e4 * signed compare fixed 2003-07-06 22:09:50 +00:00
peter
3f97c26b4b * shr and div fixed 2003-07-06 22:09:32 +00:00
peter
32d076480b * framepointer fixes for sparc
* parent framepointer code more generic
2003-07-06 17:58:22 +00:00
peter
ae8e74b45b * cleanup and first sparc implementation 2003-07-06 17:44:12 +00:00
Jonas Maebe
70a5d1e4c2 * create_paraloc_info() is now called separately for the caller and
callee info
  * fixed ppc cycle
2003-07-05 20:11:41 +00:00
peter
1e47d6ffe0 * delay slot NOPs and comments added
* a_loadaddr_ref_reg fixed and optimized to reuse passed register
    if it is not used by the ref
2003-07-03 21:09:53 +00:00
peter
b7d99ec934 * paraloc splitted in callerparaloc,calleeparaloc
* sparc calling convention updates
2003-07-02 22:18:04 +00:00
peter
c642c454a2 * freeintparaloc 2003-06-17 16:36:59 +00:00
peter
f50aba2839 * a_loadaddr_ref_reg fixed 2003-06-17 16:35:56 +00:00
peter
6ce3721d8b * JMP_BUF_SIZE changed to 4 to remove Alloctemp warnings 2003-06-17 16:35:42 +00:00
Jonas Maebe
404d344d92 * lots of newra fixes (need getfuncretparaloc implementation for i386)!
* renamed all_intregisters to volatile_intregisters and made it
    processor dependent
2003-06-17 16:34:44 +00:00
peter
e6e43724c3 * freeintparaloc added 2003-06-17 16:34:19 +00:00
Jonas Maebe
d29c96896f * fixed newra cycle for x86
* added constants for indicating source and destination operands of the
    "move reg,reg" instruction to aasmcpu (and use those in rgobj)
2003-06-14 14:53:50 +00:00
peter
0dceec9a64 * current_procdef removed, use current_procinfo.procdef instead 2003-06-13 21:19:30 +00:00
peter
65e2afbd58 * supreg_name added 2003-06-13 21:08:30 +00:00
Jonas Maebe
4db662b6d0 * fixed small LOC_(C)FPUREGISTER bug 2003-06-13 17:05:24 +00:00
mazen
b39a9919a2 - unused temp var r removed in GetExplicitRegisterInt function
* some case added for var and fauncions naming
2003-06-12 22:47:52 +00:00
peter
93138a616d * updates like the powerpc 2003-06-12 21:11:44 +00:00
Jonas Maebe
709e6da4fa - removed ALL_INTREGISTERS (only the one in rgobj is valid) 2003-06-12 19:11:34 +00:00
peter
a0b9306652 * newra compiles for sparc 2003-06-12 16:43:07 +00:00
mazen
1e7fc22124 * fix compile problem related to modification
of the declareation of GetIntParaLoc in the
  ancestor's declaration
2003-06-09 21:44:14 +00:00
mazen
d204c70f35 - making TOldRegister only declared for compatibility and
no more used in cpubase
2003-06-04 21:00:54 +00:00
mazen
4af28e59cc + added size of destination in code gen methods
+ making g_overflowcheck declaration same as
  ancestor's method declaration
2003-06-04 20:59:37 +00:00
Jonas Maebe
6f3e16298a * function results can now also be regvars
- removed tprocinfo.return_offset, never use it again since it's invalid
    if the result is a regvar
2003-06-02 21:42:05 +00:00
peter
230a14ff68 * getregisterfpu size parameter added
* op_const_reg size parameter added
  * sparc updates
2003-06-01 21:38:06 +00:00
peter
7b3095fe27 * reference fixes 2003-06-01 01:04:35 +00:00
peter
e03a8f8f69 * FMOVs fixed 2003-06-01 01:03:53 +00:00
peter
0106a4a537 * remove unsupported combinations
* reg_ref_reg only allowed for refs_lo,refs_hi
2003-06-01 01:03:41 +00:00
peter
1e7ecac976 * FUNCTION_RESULT64_LOW/HIGH_REG added for int64 results 2003-05-31 15:05:28 +00:00
peter
790e125329 * register fixes 2003-05-31 01:00:51 +00:00
peter
414bd5fa22 * more sparc cleanup
* accumulator removed, splitted in function_return_reg (called) and
    function_result_reg (caller)
2003-05-30 23:57:08 +00:00
florian
a8eb2ab740 * started to fix and clean up the sparc port 2003-05-28 23:18:31 +00:00
mazen
d0249adf22 + RegEnum2Number to ease handling register pairs
* changed convert_register_to_enum to use above
  array
2003-05-26 22:08:42 +00:00
mazen
a6880bcaa4 * added 64 bit value support to fix a problem in RTL 2003-05-26 22:04:57 +00:00
mazen
11f582061e * mnemonic of A_LDF is ld, ldf does not exist! 2003-05-26 21:31:27 +00:00
florian
995f7e0f11 * fix some small flaws which prevent sparc linux system unit from compiling
* some reformatting done
2003-05-23 22:33:48 +00:00
florian
89c93b12c4 * fixed sparc compiler compilation 2003-05-23 21:10:50 +00:00
florian
1770c1db0f * fixed sparc compilation partially 2003-05-22 16:11:22 +00:00
mazen
5d902c46cb * fixed generated code for compare instructions 2003-05-07 15:05:37 +00:00
mazen
518e7109a5 * invalid genrated code for CASE statement fixed 2003-05-07 15:04:30 +00:00
mazen
be8d4b2e26 - unused units removed from uses clause
- unused variables removed from implemntation declarations
2003-05-07 11:55:34 +00:00
mazen
e1c306879a - removed unused code 2003-05-07 11:45:02 +00:00
mazen
60e724a520 - method CheckNonCommutativeOpcode removed as not used 2003-05-07 11:28:26 +00:00
mazen
7f9fb59960 * adding emit_compare trying fixing compare bugs 2003-05-06 21:37:58 +00:00
mazen
a75a96c9b3 * A_BI changed to A_BL 2003-05-06 20:27:43 +00:00
mazen
6b490e7de4 * Invalid genrated code : A_JMPL changed to A_BA 2003-05-06 20:25:20 +00:00
mazen
de34248121 * A_BI ==> A_BL (bi ==> bl) instructions renamed 2003-05-06 20:23:44 +00:00
mazen
47ba6c2c4e * fixed a bug in a_load_const_reg related to max 13bit value limit
for immediat value ==> use of A_SETHI for greater values
2003-05-06 15:02:40 +00:00
mazen
986aa300a8 - non used code removed to bring up with powerpc changes 2003-05-06 15:00:36 +00:00
mazen
54eb17b3ff - non used constants OT_* removed
* some keywords moved lower case
2003-05-06 14:58:46 +00:00
mazen
d3a37744e4 * comment changed to ;# instead of ##
* .bss section changed to .section ".bss"
2003-05-06 14:55:27 +00:00
mazen
ace3595b4f * TOldRegister isnow just an alias for TCpuRegister
* TCpuRegister is used to define cpu register set physically available
+ CpuRegs array to easially create correspondence between TCpuRegister and TRegister
2003-04-29 12:03:52 +00:00
mazen
e3431c55d9 * fixed bug of output generated assembler for a_cmp_const_ref_label 2003-04-29 11:58:21 +00:00
mazen
ca247392ff + This file is used to define all cpu registers physically available 2003-04-29 11:53:38 +00:00
mazen
03a19b6668 * signification of ths faile has changed.
* It was used to declare the cpu registers physically available
* Now, it is used to define the register allocators paris (enum,number)
2003-04-29 11:52:52 +00:00
mazen
087d28fbcb * test of invalid opcode/operand combination gives internal error 2003-04-29 11:06:15 +00:00
mazen
12b5bae421 * instruction are moved lowercase to allow using old assmeblers 2003-04-29 10:00:31 +00:00
mazen
04e19cce0d - InternalError removed from TSparcCallNode.push_framepointer as it is called by common coplier code. 2003-04-28 09:49:58 +00:00
mazen
c475df7735 + max_scratch_regs variable added because requested by common compiler code 2003-04-28 09:46:30 +00:00
mazen
fad91e6369 + NOP after conditional jump instruction to prevent delay slot execution 2003-04-28 09:44:42 +00:00
mazen
5e741c4ca2 * Debug message in SetCondition more explicit. 2003-04-28 09:40:47 +00:00
peter
60978ba89c * aktprocdef renamed to current_procdef
* procinfo renamed to current_procinfo
  * procinfo will now be stored in current_module so it can be
    cleaned up properly
  * gen_main_procsym changed to create_main_proc and release_main_proc
    to also generate a tprocinfo structure
  * fixed unit implicit initfinal
2003-04-27 11:21:32 +00:00
peter
a5e7f02527 * updated for removed lexlevel 2003-04-27 07:48:05 +00:00
peter
72ad478f97 * fix compile for ppc,sparc,m68k 2003-04-23 21:10:54 +00:00
peter
7ff85f0779 * fix sparc compile 2003-04-23 13:35:39 +00:00
florian
0284016ee9 * fixed several issues with powerpc
+ applied a patch from Jonas for nested function calls (PowerPC only)
  * ...
2003-04-23 12:35:34 +00:00
daniel
25059e21b6 + Implemented the actual register allocator
+ Scratch registers unavailable when new register allocator used
  + maybe_save/maybe_restore unavailable when new register allocator used
2003-04-22 10:09:34 +00:00
peter
6a16389f67 * moved generic code from n386cal to ncgcal, i386 now also
uses the generic ncgcal
2003-04-04 15:38:56 +00:00
mazen
2a961db56e * fixing an LD operation without refernce in loading address parameters 2003-03-16 20:45:45 +00:00
mazen
c30ebcb633 * remaking sparc rtl compile 2003-03-15 22:51:58 +00:00
mazen
a33dd56d81 * fixing index overflow in handling new registers arrays. 2003-03-10 21:59:54 +00:00
mazen
87c9ee49d9 * FirstReg <-- R_G0 instead of Low(TOldRegister)=R_NONE
* LastReg <-- R_L7 instead of High(R_ASR31)=High(TOldRegister)
* FirstReg..LastReg rplaced by TOldRegister in several arrays declarions
2003-02-26 22:06:27 +00:00
mazen
8cb2ac6714 * code re-aligned 2 spaces 2003-02-25 21:41:44 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
mazen
ed1ba5dc1c * asm condition generation modified by TAiCpu.SetCondition 2003-02-18 22:00:20 +00:00
mazen
7b3662c508 + Load_left_right and clear_left_right implemented fixing test0001 register
allocation bug.
2003-02-13 21:15:18 +00:00
mazen
9ad1d0ffe2 * fixing bug related to errornous program main entry stack frame 2003-02-06 22:36:55 +00:00
mazen
8cb32a768b * making UNIT lower case. 2003-02-05 22:44:55 +00:00
mazen
92f035d47f * fixing run time errors related to unimplemented abstract methods in CG
+ giving empty emplementations for some RTL functions
2003-02-05 21:48:34 +00:00
mazen
a47b0fca03 * fixing internal errors related to notn when compiling RTL 2003-02-04 21:50:54 +00:00
carl
59d3edeec7 * Several bugfixes for m68k target (register alloc., opcode emission)
+ VIS target
  + Generic add more complete (still not verified)
2003-02-02 19:25:54 +00:00
mazen
0de4838d36 - internal errors rmoved from a_loar_reg_reg when reg sizes differs from 32 2003-01-22 22:30:03 +00:00
mazen
07a21319b9 * making math code in RTL compiling.
*NB : This does NOT mean necessary that it will generate correct code!
2003-01-22 20:45:15 +00:00
mazen
c3321868d5 * many stuff related to RTL fixed 2003-01-20 22:21:36 +00:00
mazen
17c27617bc * A_CMPrs --> A_FCMPs and A_CMPd --> A_FCMPd 2003-01-20 20:15:44 +00:00
daniel
7b2fd10fb4 * Converted some code in cgx86.pas to new register numbering 2003-01-09 20:40:59 +00:00
daniel
6e507ba483 * Added register conversion 2003-01-09 15:49:56 +00:00
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +00:00
mazen
c20be82919 * adding unequaln node support to sparc compiler 2003-01-07 22:03:40 +00:00
mazen
a3aea23c2e * fixing bugs related to load_reg_ref 2003-01-06 22:51:47 +00:00
mazen
215880afe8 * fixing several bugs compiling the RTL 2003-01-05 21:32:35 +00:00
mazen
c419956367 * warnings about FreeTemp already free fixed with appropriate registers handling 2003-01-05 20:39:53 +00:00
florian
b59b436130 * x86-64 compiles
+ very basic support for float128 type (x86-64 only)
2003-01-05 13:36:53 +00:00
mazen
9978ebc539 - unit cga no more used in sparc compiler. 2002-12-30 21:17:22 +00:00
mazen
33b405859b - many emitXXX removed from cga.pas in order to remove that file. 2002-12-25 20:59:49 +00:00
mazen
311508131a - some writeln(s) removed in compiler
+ many files added to RTL
* some errors fixed in RTL
2002-12-24 21:30:20 +00:00
mazen
8d888ccff0 * many internal errors related to unimplemented nodes are fixed 2002-12-22 19:26:31 +00:00
mazen
b9a1c74a71 + added shift support 2002-12-21 23:22:59 +00:00
mazen
00ee9f8063 + added support for the shift nodes
+ added debug output on screen with -an command line option
2002-12-21 23:21:47 +00:00
carl
3214bab118 * maxoperands -> max_operands (for portability in rautils.pas)
* fix some range-check errors with loadconst
  + add ncgadd unit to m68k
  * some bugfix of a_param_reg with LOC_CREFERENCE
2002-12-14 15:02:03 +00:00
florian
121ca40b39 * some variant <-> dyn. array stuff 2002-12-05 14:27:25 +00:00
mazen
3c658bda85 + ncpuinln node 2002-11-30 20:03:29 +00:00
mazen
eca8ef3436 * fixed support of nSparcInline 2002-11-25 19:21:49 +00:00
peter
f3fc72095f * splitted defbase in defutil,symutil,defcmp
* merged isconvertable and is_equal into compare_defs(_ext)
  * made operator search faster by walking the list only once
2002-11-25 17:43:16 +00:00
peter
a496dbe1ff * pass proccalloption to ret_in_xxx and push_xxx functions 2002-11-18 17:31:54 +00:00
mazen
41153e2b1a + return_result_reg and function_result_reg are now used, in all plateforms, to pass functions result between called function and its caller. See the explanation of each one 2002-11-17 17:49:08 +00:00
carl
64655be168 * memory optimization (3-4%) : cleanup of tai fields,
cleanup of tdef and tsym fields.
  * make it work for m68k
2002-11-17 16:31:55 +00:00
florian
192199b9cc * made target_cpu_name lowercase 2002-11-16 20:07:57 +00:00
florian
41b608f1bb * fixed Cish syntax 2002-11-16 15:29:16 +00:00
mazen
37247e8cde * fixing return value variable address 2002-11-14 21:42:08 +00:00
mazen
f97aa452bd * SPARC calling mechanism almost OK (as in GCC./mppcsparc ) 2002-11-10 19:07:45 +00:00
mazen
3a78921639 * A_RET --> A_RETT (RET from Trap) 2002-11-10 17:49:14 +00:00
mazen
da271ad1ba *** empty log message *** 2002-11-06 15:34:00 +00:00
mazen
928e3c583b * op_reg_reg_reg don't need any more a TOpSize parameter 2002-11-06 11:31:24 +00:00
mazen
1097619459 *** empty log message *** 2002-11-05 16:15:00 +00:00
mazen
f170b21371 * parameter handling updated 2002-11-03 20:22:40 +00:00
mazen
1e23f14e4f * TOpSize values changed S_L --> S_SW 2002-10-28 20:59:17 +00:00
mazen
379fb9a4ff * TOpSize values changed S_L --> S_SW 2002-10-28 20:37:44 +00:00
mazen
510ad4c33b * bug of references name missing last character fixed 2002-10-25 19:37:53 +00:00
mazen
351c11d2a8 - cga.pas redueced to an empty unit 2002-10-22 13:43:01 +00:00
mazen
220be9c38f + op_raddr_reg and op_caddr_reg added to fix functions prologue 2002-10-20 19:01:38 +00:00
mazen
c8b64f79dc * carl's patch applied 2002-10-19 20:35:07 +00:00
mazen
a9431165fc * branch instructions are now contigous 2002-10-17 14:48:34 +00:00
mazen
38298e3548 * patch of Carl Eric added 2002-10-16 12:36:54 +00:00
mazen
e95fb0ff3a * sone coding style modified 2002-10-15 09:00:28 +00:00
carl
955ceeed0e - remove unused files 2002-10-14 16:30:39 +00:00
mazen
3a3b8a3dc4 * assembler output format fixed 2002-10-13 21:46:07 +00:00
mazen
5ed8dfb74c - logs removed 2002-10-13 19:47:34 +00:00
mazen
b845456453 * Get/Unget expilit registers to be re-examined 2002-10-12 19:03:23 +00:00
mazen
fcc5675528 *** empty log message *** 2002-10-11 13:35:14 +00:00
mazen
7bdf0e162b - no more used 2002-10-11 11:44:44 +00:00
mazen
f8ed725882 * tabs replaces by spaces 2002-10-10 20:23:57 +00:00
mazen
b44010f639 * Just to update repsitory 2002-10-10 19:57:51 +00:00
mazen
de41a87b82 * Internal error fixed, but usually i386 parameter model used 2002-10-10 15:10:39 +00:00
mazen
9a1a530331 * internal error bug fixes thanks to Florian, but parameters now are loaded as in i386 programs (like old gcc code generator\!) 2002-10-09 18:22:56 +00:00
mazen
34df2e8e09 just incase some one wolud help me debugging that\! 2002-10-09 13:52:19 +00:00
mazen
754077f199 * debugging register allocation 2002-10-08 21:02:22 +00:00
mazen
6bc783f5c2 *** empty log message *** 2002-10-08 17:17:03 +00:00
mazen
a15b375214 word alignement modified in g_stack_frame 2002-10-07 20:33:04 +00:00
mazen
3d9be081b9 * register allocation for parameters now done in cpupara, but InternalError(200109223) in cgcpu.pas:1053 is still not fixed du to location_force problem in ncgutils.pas:419 2002-10-04 21:57:42 +00:00
mazen
14bb0a51b4 + out registers allocator for the first 6 scalar parameters which must be passed into %o0..%o5 2002-10-02 22:20:28 +00:00
mazen
b5882415a3 + procedures exiting prologue added and stack frame now restored in the delay slot of the return (JMPL) instruction 2002-10-01 21:35:58 +00:00
mazen
b2c63fb6ca attinst.inc --> strinst.inc 2002-10-01 21:06:29 +00:00
mazen
807d2d4d63 attinst.inc --> strinst.inc 2002-10-01 21:06:29 +00:00
florian
0282138de4 * fixed log and id 2002-10-01 17:41:50 +00:00
mazen
3a70e9a021 * function epilogue modified to much SPARC ABIN 2002-09-30 21:07:13 +00:00
mazen
f83c707f71 * function prologue fixed 2002-09-30 19:12:14 +00:00
mazen
93164206b3 * cleanup made 2002-09-27 04:30:53 +00:00
mazen
a36f746c54 * some cleanup was made 2002-09-24 03:57:53 +00:00
mazen
4c607d6126 * a compile bug fixed 2002-09-21 10:22:43 +00:00
mazen
d78bf17c1d + call support 2002-09-19 20:24:41 +00:00
Jonas Maebe
a15d8cfe39 * a_load_reg_reg() now has two size parameters: source and dest. This
allows some optimizations on architectures that don't encode the
    register size in the register name.
2002-09-17 18:54:01 +00:00
carl
752beef0dd * cardinal -> longword 2002-09-07 20:40:23 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
mazen
2b9b0d86ed +generic register names commented 2002-09-03 07:41:00 +00:00
mazen
c7bf4df982 *call parameter handling is now based on the new param manager 2002-08-30 13:16:23 +00:00
mazen
12c3e9a760 ncgcall.pas moved to ncpucall.pas (I'd like ncpu* insteade of nsparc* since it
provides processor independent units naming)
2002-08-30 06:15:27 +00:00
mazen
dd411127f4 added support for SPARC processors 2002-08-29 11:02:36 +00:00
mazen
66ab5e4a54 File added support to the new generic parameter handling 2002-08-29 10:16:20 +00:00
mazen
221d94a65e + added ncpucnp to fix a call to an abstract method in pss_2 2002-08-29 10:07:47 +00:00
mazen
7dff137383 GDB support added 2002-08-23 10:33:30 +00:00
mazen
c52839c2d6 *** empty log message *** 2002-08-23 10:08:28 +00:00
mazen
af7d17d28c stab_regindex added for GDB support 2002-08-23 09:53:15 +00:00
mazen
9df674734c psystem.pas removed from sparc directory 2002-08-22 10:13:29 +00:00
mazen
dc65ff681b first insertion 2002\08\22 2002-08-22 08:30:50 +00:00
mazen
ab508fa44f *** empty log message *** 2002-08-21 13:30:07 +00:00