~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to compiler/x86/cpubase.pas

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
    $Id: cpubase.pas,v 1.42 2004/02/27 10:21:06 florian Exp $
 
2
    $Id: cpubase.pas,v 1.51 2005/02/26 01:27:00 jonas Exp $
3
3
    Copyright (c) 1998-2002 by Florian Klaempfl and Peter Vreman
4
4
 
5
5
    Contains the base types for the i386 and x86-64 architecture
36
36
 
37
37
uses
38
38
  cutils,cclasses,
39
 
  globtype,globals,
40
 
  cpuinfo,
41
 
  aasmbase,
 
39
  globtype,
42
40
  cgbase
43
 
{$ifdef delphi}
44
 
  ,dmisc
45
 
{$endif}
46
41
  ;
47
42
 
48
43
 
137
132
 
138
133
      { Number of first imaginary register }
139
134
{$ifdef x86_64}
140
 
      first_sse_imreg     = $10;
 
135
      first_mm_imreg     = $10;
141
136
{$else x86_64}
142
 
      first_sse_imreg     = $08;
 
137
      first_mm_imreg     = $08;
143
138
{$endif x86_64}
144
139
 
145
140
      { The subregister that specifies the entire register }
184
179
{$endif x86_64}
185
180
      );
186
181
 
 
182
      regdwarf_table : array[tregisterindex] of shortint = (
 
183
{$ifdef x86_64}
 
184
        {$i r8664dwrf.inc}
 
185
{$else x86_64}
 
186
        {$i r386dwrf.inc}
 
187
{$endif x86_64}
 
188
      );
 
189
 
187
190
   type
188
191
      totherregisterset = set of tregisterindex;
189
192
 
206
209
        'ns','nz','o','p','pe','po','s','z'
207
210
      );
208
211
 
209
 
      inverse_cond:array[TAsmCond] of TAsmCond=(C_None,
210
 
        C_NA,C_NAE,C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_A,C_AE,
211
 
        C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_O,C_P,
212
 
        C_S,C_Z,C_NO,C_NP,C_NP,C_P,C_NS,C_NZ
213
 
      );
214
 
 
215
212
{*****************************************************************************
216
213
                                   Flags
217
214
*****************************************************************************}
221
218
                   F_A,F_AE,F_B,F_BE,
222
219
                   F_S,F_NS,F_O,F_NO);
223
220
 
224
 
{*****************************************************************************
225
 
                                Reference
226
 
*****************************************************************************}
227
 
 
228
 
    type
229
 
      { reference record, reordered for best alignment }
230
 
      preference = ^treference;
231
 
      treference = record
232
 
         offset      : aint;
233
 
         symbol,
234
 
         relsymbol   : tasmsymbol;
235
 
         segment,
236
 
         base,
237
 
         index       : tregister;
238
 
         refaddr     : trefaddr;
239
 
         scalefactor : byte;
240
 
      end;
241
 
 
242
 
      { reference record }
243
 
      pparareference = ^tparareference;
244
 
      tparareference = packed record
245
 
         index       : tregister;
246
 
         offset      : aint;
247
 
      end;
248
 
 
249
 
{*****************************************************************************
250
 
                               Generic Location
251
 
*****************************************************************************}
252
 
 
253
 
    type
254
 
      { tparamlocation describes where a parameter for a procedure is stored.
255
 
        References are given from the caller's point of view. The usual
256
 
        TLocation isn't used, because contains a lot of unnessary fields.
257
 
      }
258
 
      tparalocation = record
259
 
         size : TCGSize;
260
 
         loc  : TCGLoc;
261
 
         { Location type of registerhigh, for x86_64 this can
262
 
           be different from loc when pushing structures of 16 bytes }
263
 
         lochigh : TCGLoc;
264
 
         alignment : byte;
265
 
         case TCGLoc of
266
 
            LOC_REFERENCE : (reference : tparareference);
267
 
            { segment in reference at the same place as in loc_register }
268
 
            LOC_REGISTER,LOC_CREGISTER : (
269
 
              case longint of
270
 
                1 : (register,registerhigh : tregister);
271
 
                { overlay a registerlow }
272
 
                2 : (registerlow : tregister);
273
 
{$ifndef cpu64bit}
274
 
                { overlay a 64 Bit register type }
275
 
                3 : (register64 : tregister64);
276
 
{$endif cpu64bit}
277
 
              );
278
 
            { it's only for better handling }
279
 
            LOC_MMXREGISTER,LOC_CMMXREGISTER : (
280
 
              case longint of
281
 
              0: (mmxreg : tregister);
282
 
              1: (mmxregset : Tregistermmxset);
283
 
            );
284
 
      end;
285
 
 
286
 
      tlocation = packed record
287
 
         loc  : TCGLoc;
288
 
         size : TCGSize;
289
 
         case TCGLoc of
290
 
            LOC_FLAGS : (resflags : tresflags);
291
 
            LOC_CONSTANT : (
292
 
              case longint of
293
 
                1 : (value : AWord);
294
 
                { can't do this, this layout depends on the host cpu. Use }
295
 
                { lo(valueqword)/hi(valueqword) instead (JM)              }
296
 
                { 2 : (valuelow, valuehigh:AWord);                        }
297
 
                { overlay a complete 64 Bit value }
298
 
                3 : (valueqword : qword);
299
 
              );
300
 
            LOC_CREFERENCE,
301
 
            LOC_REFERENCE : (reference : treference);
302
 
            { segment in reference at the same place as in loc_register }
303
 
            LOC_REGISTER,LOC_CREGISTER : (
304
 
              case longint of
305
 
                1 : (register,registerhigh,segment : tregister);
306
 
                { overlay a registerlow }
307
 
                2 : (registerlow : tregister);
308
 
                { overlay a 64 Bit register type }
309
 
                3 : (reg64 : tregister64);
310
 
                4 : (register64 : tregister64);
311
 
              );
312
 
            { it's only for better handling }
313
 
            LOC_MMXREGISTER,LOC_CMMXREGISTER : (mmxreg : tregister);
314
 
      end;
315
221
 
316
222
{*****************************************************************************
317
223
                                 Constants
337
243
 
338
244
    function cgsize2subreg(s:Tcgsize):Tsubregister;
339
245
    function reg2opsize(r:Tregister):topsize;
 
246
    function reg_cgsize(const reg: tregister): tcgsize;
340
247
    function is_calljmp(o:tasmop):boolean;
341
248
    procedure inverse_flags(var f: TResFlags);
342
249
    function flags_to_cond(const f: TResFlags) : TAsmCond;
345
252
    function std_regnum_search(const s:string):Tregister;
346
253
    function std_regname(r:Tregister):string;
347
254
 
 
255
    function inverse_cond(const c: TAsmCond): TAsmCond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
 
256
    function conditions_equal(const c1, c2: TAsmCond): boolean; {$ifdef USEINLINE}inline;{$endif USEINLINE}
348
257
 
349
258
implementation
350
259
 
395
304
            cgsize2subreg:=R_SUBQ;
396
305
          OS_M64:
397
306
            cgsize2subreg:=R_SUBNONE;
398
 
          OS_F32,OS_F64,
 
307
          OS_F32,OS_F64,OS_C64,
399
308
          OS_M128,OS_MS128:
400
309
            cgsize2subreg:=R_SUBWHOLE;
401
310
          else
404
313
      end;
405
314
 
406
315
 
 
316
    function reg_cgsize(const reg: tregister): tcgsize;
 
317
      const subreg2cgsize:array[Tsubregister] of Tcgsize =
 
318
            (OS_NO,OS_8,OS_8,OS_16,OS_32,OS_64,OS_NO,OS_NO,OS_NO);
 
319
      begin
 
320
        case getregtype(reg) of
 
321
          R_INTREGISTER :
 
322
            reg_cgsize:=subreg2cgsize[getsubreg(reg)];
 
323
          R_FPUREGISTER :
 
324
            reg_cgsize:=OS_F80;
 
325
          R_MMXREGISTER:
 
326
            reg_cgsize:=OS_M64;
 
327
          R_MMREGISTER:
 
328
            reg_cgsize:=OS_M128;
 
329
          R_SPECIALREGISTER :
 
330
            case reg of
 
331
              NR_CS,NR_DS,NR_ES,NR_SS,NR_FS,NR_GS:
 
332
                reg_cgsize:=OS_16
 
333
              else
 
334
                reg_cgsize:=OS_32
 
335
            end
 
336
          else
 
337
            internalerror(200303181);
 
338
          end;
 
339
        end;
 
340
 
 
341
 
407
342
    function reg2opsize(r:Tregister):topsize;
408
343
      const
409
344
        subreg2opsize : array[tsubregister] of topsize =
410
 
          (S_NO,S_B,S_B,S_W,S_L,S_Q,S_NO,S_NO);
 
345
          (S_NO,S_B,S_B,S_W,S_L,S_Q,S_NO,S_NO,S_NO);
411
346
      begin
412
347
        reg2opsize:=S_L;
413
348
        case getregtype(r) of
506
441
          result:=generic_regname(r);
507
442
      end;
508
443
 
 
444
 
 
445
    function inverse_cond(const c: TAsmCond): TAsmCond; {$ifdef USEINLINE}inline;{$endif USEINLINE}
 
446
      const
 
447
        inverse: array[TAsmCond] of TAsmCond=(C_None,
 
448
          C_NA,C_NAE,C_NB,C_NBE,C_NC,C_NE,C_NG,C_NGE,C_NL,C_NLE,C_A,C_AE,
 
449
          C_B,C_BE,C_C,C_E,C_G,C_GE,C_L,C_LE,C_O,C_P,
 
450
          C_S,C_Z,C_NO,C_NP,C_NP,C_P,C_NS,C_NZ
 
451
        );
 
452
      begin
 
453
        result := inverse[c];
 
454
      end;
 
455
 
 
456
 
 
457
    function conditions_equal(const c1, c2: TAsmCond): boolean; {$ifdef USEINLINE}inline;{$endif USEINLINE}
 
458
      begin
 
459
        result := c1 = c2;
 
460
      end;
 
461
 
 
462
 
 
463
 
509
464
end.
510
465
{
511
466
  $Log: cpubase.pas,v $
512
 
  Revision 1.42  2004/02/27 10:21:06  florian
513
 
    * top_symbol killed
514
 
    + refaddr to treference added
515
 
    + refsymbol to treference added
516
 
    * top_local stuff moved to an extra record to save memory
517
 
    + aint introduced
518
 
    * tppufile.get/putint64/aint implemented
519
 
 
520
 
  Revision 1.41  2004/02/22 18:27:21  florian
521
 
    * fixed exception reason size for 64 bit systems
522
 
 
523
 
  Revision 1.40  2004/02/05 18:28:37  peter
524
 
    * x86_64 fixes for opsize
525
 
 
526
 
  Revision 1.39  2004/02/04 22:01:13  peter
527
 
    * first try to get cpupara working for x86_64
528
 
 
529
 
  Revision 1.38  2004/01/30 13:42:03  florian
530
 
    * fixed more alignment issues
531
 
 
532
 
  Revision 1.37  2004/01/15 14:01:32  florian
533
 
    + x86 instruction tables for x86-64 extended
534
 
 
535
 
  Revision 1.36  2004/01/14 23:39:05  florian
536
 
    * another bunch of x86-64 fixes mainly calling convention and
537
 
      assembler reader related
538
 
 
539
 
  Revision 1.35  2004/01/12 16:37:59  peter
540
 
    * moved spilling code from taicpu to rg
541
 
 
542
 
  Revision 1.34  2003/12/26 13:19:16  florian
543
 
    * rtl and compiler compile with -Cfsse2
544
 
 
545
 
  Revision 1.33  2003/12/25 01:07:09  florian
546
 
    + $fputype directive support
547
 
    + single data type operations with sse unit
548
 
    * fixed more x86-64 stuff
549
 
 
550
 
  Revision 1.32  2003/12/19 22:08:44  daniel
551
 
    * Some work to restore the MMX capabilities
552
 
 
553
 
  Revision 1.31  2003/12/15 21:25:49  peter
554
 
    * reg allocations for imaginary register are now inserted just
555
 
      before reg allocation
556
 
    * tregister changed to enum to allow compile time check
557
 
    * fixed several tregister-tsuperregister errors
558
 
 
559
 
  Revision 1.30  2003/10/31 09:22:55  mazen
560
 
  * using findreg_by_<name|number>_table directly to decrease heap overheading
561
 
 
562
 
  Revision 1.29  2003/10/30 17:13:18  peter
563
 
    * fixed findreg_by_number
564
 
    * renamed rghelper to rgbase
565
 
 
566
 
  Revision 1.28  2003/10/30 15:03:18  mazen
567
 
  * now uses standard routines in rgHelper unit to search registers by number and by name
568
 
 
569
 
  Revision 1.27  2003/10/17 15:08:34  peter
570
 
    * commented out more obsolete constants
571
 
 
572
 
  Revision 1.26  2003/10/17 14:38:32  peter
573
 
    * 64k registers supported
574
 
    * fixed some memory leaks
575
 
 
576
 
  Revision 1.25  2003/10/11 16:06:42  florian
577
 
    * fixed some MMX<->SSE
578
 
    * started to fix ppc, needs an overhaul
579
 
    + stabs info improve for spilling, not sure if it works correctly/completly
580
 
    - MMX_SUPPORT removed from Makefile.fpc
581
 
 
582
 
  Revision 1.24  2003/10/09 21:31:37  daniel
583
 
    * Register allocator splitted, ans abstract now
584
 
 
585
 
  Revision 1.23  2003/10/03 22:00:33  peter
586
 
    * parameter alignment fixes
587
 
 
588
 
  Revision 1.22  2003/10/01 20:34:51  peter
589
 
    * procinfo unit contains tprocinfo
590
 
    * cginfo renamed to cgbase
591
 
    * moved cgmessage to verbose
592
 
    * fixed ppc and sparc compiles
593
 
 
594
 
  Revision 1.21  2003/09/28 21:49:39  peter
595
 
    * removed emitjmp
596
 
 
597
 
  Revision 1.20  2003/09/25 21:29:23  peter
598
 
    * remove sp_fixup
599
 
 
600
 
  Revision 1.19  2003/09/24 17:12:36  florian
601
 
    * x86-64 adaptions
602
 
 
603
 
  Revision 1.18  2003/09/23 17:56:06  peter
604
 
    * locals and paras are allocated in the code generation
605
 
    * tvarsym.localloc contains the location of para/local when
606
 
      generating code for the current procedure
607
 
 
608
 
  Revision 1.17  2003/09/07 22:09:35  peter
609
 
    * preparations for different default calling conventions
610
 
    * various RA fixes
611
 
 
612
 
  Revision 1.16  2003/09/04 21:07:03  florian
613
 
    * ARM compiler compiles again
614
 
 
615
 
  Revision 1.15  2003/09/03 15:55:02  peter
616
 
    * NEWRA branch merged
617
 
 
618
 
  Revision 1.14  2003/09/03 11:18:37  florian
619
 
    * fixed arm concatcopy
620
 
    + arm support in the common compiler sources added
621
 
    * moved some generic cg code around
622
 
    + tfputype added
623
 
    * ...
624
 
 
625
 
  Revision 1.13.2.8  2003/08/31 19:31:51  daniel
626
 
    * FIxed superregister constants
627
 
 
628
 
  Revision 1.13.2.7  2003/08/31 16:18:05  peter
629
 
    * more fixes
630
 
 
631
 
  Revision 1.13.2.6  2003/08/31 15:46:26  peter
632
 
    * more updates for tregister
633
 
 
634
 
  Revision 1.13.2.5  2003/08/31 13:50:16  daniel
635
 
    * Remove sorting and use pregenerated indexes
636
 
    * Some work on making things compile
637
 
 
638
 
  Revision 1.13.2.4  2003/08/29 17:29:00  peter
639
 
    * next batch of updates
640
 
 
641
 
  Revision 1.13.2.3  2003/08/28 18:35:08  peter
642
 
    * tregister changed to cardinal
643
 
 
644
 
  Revision 1.13.2.2  2003/08/27 21:06:34  peter
645
 
    * more updates
646
 
 
647
 
  Revision 1.13.2.1  2003/08/27 19:55:54  peter
648
 
    * first tregister patch
649
 
 
650
 
  Revision 1.13  2003/08/20 07:48:04  daniel
651
 
    * Made internal assembler use new register coding
652
 
 
653
 
  Revision 1.12  2003/08/17 16:59:20  jonas
654
 
    * fixed regvars so they work with newra (at least for ppc)
655
 
    * fixed some volatile register bugs
656
 
    + -dnotranslation option for -dnewra, which causes the registers not to
657
 
      be translated from virtual to normal registers. Requires support in
658
 
      the assembler writer as well, which is only implemented in aggas/
659
 
      agppcgas currently
660
 
 
661
 
  Revision 1.11  2003/07/06 21:50:33  jonas
662
 
    * fixed ppc compilation problems and changed VOLATILE_REGISTERS for x86
663
 
      so that it doesn't include ebp and esp anymore
664
 
 
665
 
  Revision 1.10  2003/06/17 16:34:45  jonas
666
 
    * lots of newra fixes (need getfuncretparaloc implementation for i386)!
667
 
    * renamed all_intregisters to volatile_intregisters and made it
668
 
      processor dependent
669
 
 
670
 
  Revision 1.9  2003/06/13 21:19:33  peter
671
 
    * current_procdef removed, use current_procinfo.procdef instead
672
 
 
673
 
  Revision 1.8  2003/06/12 19:11:34  jonas
674
 
    - removed ALL_INTREGISTERS (only the one in rgobj is valid)
675
 
 
676
 
  Revision 1.7  2003/06/03 21:11:09  peter
677
 
    * cg.a_load_* get a from and to size specifier
678
 
    * makeregsize only accepts newregister
679
 
    * i386 uses generic tcgnotnode,tcgunaryminus
680
 
 
681
 
  Revision 1.6  2003/06/03 13:01:59  daniel
682
 
    * Register allocator finished
683
 
 
684
 
  Revision 1.5  2003/05/30 23:57:08  peter
685
 
    * more sparc cleanup
686
 
    * accumulator removed, splitted in function_return_reg (called) and
687
 
      function_result_reg (caller)
688
 
 
689
 
  Revision 1.4  2003/04/30 20:53:32  florian
690
 
    * error when address of an abstract method is taken
691
 
    * fixed some x86-64 problems
692
 
    * merged some more x86-64 and i386 code
693
 
 
694
 
  Revision 1.3  2002/04/25 20:15:40  florian
695
 
    * block nodes within expressions shouldn't release the used registers,
696
 
      fixed using a flag till the new rg is ready
697
 
 
698
 
  Revision 1.2  2002/04/25 16:12:09  florian
699
 
    * fixed more problems with cpubase and x86-64
700
 
 
701
 
  Revision 1.1  2003/04/25 11:12:09  florian
702
 
    * merged i386/cpubase and x86_64/cpubase to x86/cpubase;
703
 
      different stuff went to cpubase.inc
704
 
 
705
 
  Revision 1.50  2003/04/25 08:25:26  daniel
706
 
    * Ifdefs around a lot of calls to cleartempgen
707
 
    * Fixed registers that are allocated but not freed in several nodes
708
 
    * Tweak to register allocator to cause less spills
709
 
    * 8-bit registers now interfere with esi,edi and ebp
710
 
      Compiler can now compile rtl successfully when using new register
711
 
      allocator
712
 
 
713
 
  Revision 1.49  2003/04/22 23:50:23  peter
714
 
    * firstpass uses expectloc
715
 
    * checks if there are differences between the expectloc and
716
 
      location.loc from secondpass in EXTDEBUG
717
 
 
718
 
  Revision 1.48  2003/04/22 14:33:38  peter
719
 
    * removed some notes/hints
720
 
 
721
 
  Revision 1.47  2003/04/22 10:09:35  daniel
722
 
    + Implemented the actual register allocator
723
 
    + Scratch registers unavailable when new register allocator used
724
 
    + maybe_save/maybe_restore unavailable when new register allocator used
725
 
 
726
 
  Revision 1.46  2003/04/21 19:16:50  peter
727
 
    * count address regs separate
728
 
 
729
 
  Revision 1.45  2003/03/28 19:16:57  peter
730
 
    * generic constructor working for i386
731
 
    * remove fixed self register
732
 
    * esi added as address register for i386
733
 
 
734
 
  Revision 1.44  2003/03/18 18:15:53  peter
735
 
    * changed reg2opsize to function
736
 
 
737
 
  Revision 1.43  2003/03/08 08:59:07  daniel
738
 
    + $define newra will enable new register allocator
739
 
    + getregisterint will return imaginary registers with $newra
740
 
    + -sr switch added, will skip register allocation so you can see
741
 
      the direct output of the code generator before register allocation
742
 
 
743
 
  Revision 1.42  2003/02/19 22:00:15  daniel
744
 
    * Code generator converted to new register notation
745
 
    - Horribily outdated todo.txt removed
746
 
 
747
 
  Revision 1.41  2003/02/02 19:25:54  carl
748
 
    * Several bugfixes for m68k target (register alloc., opcode emission)
749
 
    + VIS target
750
 
    + Generic add more complete (still not verified)
751
 
 
752
 
  Revision 1.40  2003/01/13 18:37:44  daniel
753
 
    * Work on register conversion
754
 
 
755
 
  Revision 1.39  2003/01/09 20:41:00  daniel
756
 
    * Converted some code in cgx86.pas to new register numbering
757
 
 
758
 
  Revision 1.38  2003/01/09 15:49:56  daniel
759
 
    * Added register conversion
760
 
 
761
 
  Revision 1.37  2003/01/08 22:32:36  daniel
762
 
    * Added register convesrion procedure
763
 
 
764
 
  Revision 1.36  2003/01/08 18:43:57  daniel
765
 
   * Tregister changed into a record
766
 
 
767
 
  Revision 1.35  2003/01/05 13:36:53  florian
768
 
    * x86-64 compiles
769
 
    + very basic support for float128 type (x86-64 only)
770
 
 
771
 
  Revision 1.34  2002/11/17 18:26:16  mazen
772
 
  * fixed a compilation bug accmulator-->FUNCTION_RETURN_REG, in definition of return_result_reg
773
 
 
774
 
  Revision 1.33  2002/11/17 17:49:08  mazen
775
 
  + 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
776
 
 
777
 
  Revision 1.32  2002/10/05 12:43:29  carl
778
 
    * fixes for Delphi 6 compilation
779
 
     (warning : Some features do not work under Delphi)
780
 
 
781
 
  Revision 1.31  2002/08/14 18:41:48  jonas
782
 
    - remove valuelow/valuehigh fields from tlocation, because they depend
783
 
      on the endianess of the host operating system -> difficult to get
784
 
      right. Use lo/hi(location.valueqword) instead (remember to use
785
 
      valueqword and not value!!)
786
 
 
787
 
  Revision 1.30  2002/08/13 21:40:58  florian
788
 
    * more fixes for ppc calling conventions
789
 
 
790
 
  Revision 1.29  2002/08/12 15:08:41  carl
791
 
    + stab register indexes for powerpc (moved from gdb to cpubase)
792
 
    + tprocessor enumeration moved to cpuinfo
793
 
    + linker in target_info is now a class
794
 
    * many many updates for m68k (will soon start to compile)
795
 
    - removed some ifdef or correct them for correct cpu
796
 
 
797
 
  Revision 1.28  2002/08/06 20:55:23  florian
798
 
    * first part of ppc calling conventions fix
799
 
 
800
 
  Revision 1.27  2002/07/25 18:01:29  carl
801
 
    + FPURESULTREG -> FPU_RESULT_REG
802
 
 
803
 
  Revision 1.26  2002/07/07 09:52:33  florian
804
 
    * powerpc target fixed, very simple units can be compiled
805
 
    * some basic stuff for better callparanode handling, far from being finished
806
 
 
807
 
  Revision 1.25  2002/07/01 18:46:30  peter
808
 
    * internal linker
809
 
    * reorganized aasm layer
810
 
 
811
 
  Revision 1.24  2002/07/01 16:23:55  peter
812
 
    * cg64 patch
813
 
    * basics for currency
814
 
    * asnode updates for class and interface (not finished)
815
 
 
816
 
  Revision 1.23  2002/05/18 13:34:22  peter
817
 
    * readded missing revisions
818
 
 
819
 
  Revision 1.22  2002/05/16 19:46:50  carl
820
 
  + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
821
 
  + try to fix temp allocation (still in ifdef)
822
 
  + generic constructor calls
823
 
  + start of tassembler / tmodulebase class cleanup
824
 
 
825
 
  Revision 1.19  2002/05/12 16:53:16  peter
826
 
    * moved entry and exitcode to ncgutil and cgobj
827
 
    * foreach gets extra argument for passing local data to the
828
 
      iterator function
829
 
    * -CR checks also class typecasts at runtime by changing them
830
 
      into as
831
 
    * fixed compiler to cycle with the -CR option
832
 
    * fixed stabs with elf writer, finally the global variables can
833
 
      be watched
834
 
    * removed a lot of routines from cga unit and replaced them by
835
 
      calls to cgobj
836
 
    * u32bit-s32bit updates for and,or,xor nodes. When one element is
837
 
      u32bit then the other is typecasted also to u32bit without giving
838
 
      a rangecheck warning/error.
839
 
    * fixed pascal calling method with reversing also the high tree in
840
 
      the parast, detected by tcalcst3 test
841
 
 
842
 
  Revision 1.18  2002/04/21 15:31:40  carl
843
 
  - removed some other stuff to their units
844
 
 
845
 
  Revision 1.17  2002/04/20 21:37:07  carl
846
 
  + generic FPC_CHECKPOINTER
847
 
  + first parameter offset in stack now portable
848
 
  * rename some constants
849
 
  + move some cpu stuff to other units
850
 
  - remove unused constents
851
 
  * fix stacksize for some targets
852
 
  * fix generic size problems which depend now on EXTEND_SIZE constant
853
 
  * removing frame pointer in routines is only available for : i386,m68k and vis targets
854
 
 
855
 
  Revision 1.16  2002/04/15 19:53:54  peter
856
 
    * fixed conflicts between the last 2 commits
857
 
 
858
 
  Revision 1.15  2002/04/15 19:44:20  peter
859
 
    * fixed stackcheck that would be called recursively when a stack
860
 
      error was found
861
 
    * generic changeregsize(reg,size) for i386 register resizing
862
 
    * removed some more routines from cga unit
863
 
    * fixed returnvalue handling
864
 
    * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
865
 
 
866
 
  Revision 1.14  2002/04/15 19:12:09  carl
867
 
  + target_info.size_of_pointer -> pointer_size
868
 
  + some cleanup of unused types/variables
869
 
  * move several constants from cpubase to their specific units
870
 
    (where they are used)
871
 
  + att_Reg2str -> gas_reg2str
872
 
  + int_reg2str -> std_reg2str
873
 
 
874
 
  Revision 1.13  2002/04/14 16:59:41  carl
875
 
  + att_reg2str -> gas_reg2str
876
 
 
877
 
  Revision 1.12  2002/04/02 17:11:34  peter
878
 
    * tlocation,treference update
879
 
    * LOC_CONSTANT added for better constant handling
880
 
    * secondadd splitted in multiple routines
881
 
    * location_force_reg added for loading a location to a register
882
 
      of a specified size
883
 
    * secondassignment parses now first the right and then the left node
884
 
      (this is compatible with Kylix). This saves a lot of push/pop especially
885
 
      with string operations
886
 
    * adapted some routines to use the new cg methods
887
 
 
888
 
  Revision 1.11  2002/03/31 20:26:37  jonas
889
 
    + a_loadfpu_* and a_loadmm_* methods in tcg
890
 
    * register allocation is now handled by a class and is mostly processor
891
 
      independent (+rgobj.pas and i386/rgcpu.pas)
892
 
    * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
893
 
    * some small improvements and fixes to the optimizer
894
 
    * some register allocation fixes
895
 
    * some fpuvaroffset fixes in the unary minus node
896
 
    * push/popusedregisters is now called rg.save/restoreusedregisters and
897
 
      (for i386) uses temps instead of push/pop's when using -Op3 (that code is
898
 
      also better optimizable)
899
 
    * fixed and optimized register saving/restoring for new/dispose nodes
900
 
    * LOC_FPU locations now also require their "register" field to be set to
901
 
      R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
902
 
    - list field removed of the tnode class because it's not used currently
903
 
      and can cause hard-to-find bugs
904
 
 
905
 
  Revision 1.10  2002/03/04 19:10:12  peter
906
 
    * removed compiler warnings
 
467
  Revision 1.51  2005/02/26 01:27:00  jonas
 
468
    * fixed generic jumps optimizer and enabled it for ppc (the label table
 
469
      was not being initialised -> getfinaldestination always failed, which
 
470
      caused wrong optimizations in some cases)
 
471
    * changed the inverse_cond into a function, because tasmcond is a record
 
472
      on ppc
 
473
    + added a compare_conditions() function for the same reason
 
474
 
 
475
  Revision 1.50  2005/02/14 17:13:10  peter
 
476
    * truncate log
907
477
 
908
478
}