226
228
$Log: n386set.pas,v $
227
Revision 1.74 2004/05/22 23:34:28 peter
228
tai_regalloc.allocation changed to ratype to notify rgobj of register size changes
230
Revision 1.73 2004/02/27 10:21:05 florian
232
+ refaddr to treference added
233
+ refsymbol to treference added
234
* top_local stuff moved to an extra record to save memory
236
* tppufile.get/putint64/aint implemented
238
Revision 1.72 2004/02/22 12:04:04 florian
240
* some more x86-64 fixes
242
Revision 1.71 2004/02/03 22:32:54 peter
243
* renamed xNNbittype to xNNinttype
244
* renamed registers32 to registersint
245
* replace some s32bit,u32bit with torddef([su]inttype).def.typ
247
Revision 1.70 2003/11/07 15:58:32 florian
248
* Florian's culmutative nr. 1; contains:
249
- invalid calling conventions for a certain cpu are rejected
250
- arm softfloat calling conventions
251
- -Sp for cpu dependend code generation
253
- remaining code for value open array paras on heap
255
Revision 1.69 2003/10/10 17:48:14 peter
256
* old trgobj moved to x86/rgcpu and renamed to trgx86fpu
257
* tregisteralloctor renamed to trgobj
258
* removed rgobj from a lot of units
259
* moved location_* and reference_* to cgobj
260
* first things for mmx register allocation
262
Revision 1.68 2003/10/09 21:31:37 daniel
263
* Register allocator splitted, ans abstract now
265
Revision 1.67 2003/10/01 20:34:49 peter
266
* procinfo unit contains tprocinfo
267
* cginfo renamed to cgbase
268
* moved cgmessage to verbose
269
* fixed ppc and sparc compiles
271
Revision 1.66 2003/09/28 21:48:20 peter
274
Revision 1.65 2003/09/07 22:09:35 peter
275
* preparations for different default calling conventions
278
Revision 1.64 2003/09/05 11:21:39 marco
279
* applied Peter's patch. Now cycles.
281
Revision 1.63 2003/09/03 15:55:01 peter
282
* NEWRA branch merged
284
Revision 1.62.2.1 2003/08/29 17:29:00 peter
285
* next batch of updates
287
Revision 1.62 2003/06/12 22:10:44 jonas
288
* t386innode.pass_2 already doesn't call a helper anymore since a long
291
Revision 1.61 2003/06/03 21:11:09 peter
292
* cg.a_load_* get a from and to size specifier
293
* makeregsize only accepts newregister
294
* i386 uses generic tcgnotnode,tcgunaryminus
296
Revision 1.60 2003/06/01 21:38:06 peter
297
* getregisterfpu size parameter added
298
* op_const_reg size parameter added
301
Revision 1.59 2003/05/31 15:04:31 peter
302
* load_loc_reg update
304
Revision 1.58 2003/05/22 21:32:29 peter
305
* removed some unit dependencies
307
Revision 1.57 2003/04/27 11:21:35 peter
308
* aktprocdef renamed to current_procdef
309
* procinfo renamed to current_procinfo
310
* procinfo will now be stored in current_module so it can be
312
* gen_main_procsym changed to create_main_proc and release_main_proc
313
to also generate a tprocinfo structure
314
* fixed unit implicit initfinal
316
Revision 1.56 2003/04/25 08:25:26 daniel
317
* Ifdefs around a lot of calls to cleartempgen
318
* Fixed registers that are allocated but not freed in several nodes
319
* Tweak to register allocator to cause less spills
320
* 8-bit registers now interfere with esi,edi and ebp
321
Compiler can now compile rtl successfully when using new register
324
Revision 1.55 2003/04/23 09:51:16 daniel
325
* Removed usage of edi in a lot of places when new register allocator used
326
+ Added newra versions of g_concatcopy and secondadd_float
328
Revision 1.54 2003/04/22 23:50:23 peter
329
* firstpass uses expectloc
330
* checks if there are differences between the expectloc and
331
location.loc from secondpass in EXTDEBUG
333
Revision 1.53 2003/04/22 14:33:38 peter
334
* removed some notes/hints
336
Revision 1.52 2003/04/22 10:09:35 daniel
337
+ Implemented the actual register allocator
338
+ Scratch registers unavailable when new register allocator used
339
+ maybe_save/maybe_restore unavailable when new register allocator used
341
Revision 1.51 2003/03/13 19:52:23 jonas
342
* and more new register allocator fixes (in the i386 code generator this
343
time). At least now the ppc cross compiler can compile the linux
344
system unit again, but I haven't tested it.
346
Revision 1.50 2003/02/26 23:06:13 daniel
347
* Fixed an illegal use of makeregsize
349
Revision 1.49 2003/02/19 22:39:56 daniel
352
Revision 1.48 2003/02/19 22:00:15 daniel
353
* Code generator converted to new register notation
354
- Horribily outdated todo.txt removed
356
Revision 1.47 2003/01/13 14:54:34 daniel
357
* Further work to convert codegenerator register convention;
358
internalerror bug fixed.
360
Revision 1.46 2003/01/08 18:43:57 daniel
361
* Tregister changed into a record
363
Revision 1.45 2002/11/25 17:43:27 peter
364
* splitted defbase in defutil,symutil,defcmp
365
* merged isconvertable and is_equal into compare_defs(_ext)
366
* made operator search faster by walking the list only once
368
Revision 1.44 2002/10/03 21:34:45 carl
369
* range check error fixes
371
Revision 1.43 2002/09/17 18:54:05 jonas
372
* a_load_reg_reg() now has two size parameters: source and dest. This
373
allows some optimizations on architectures that don't encode the
374
register size in the register name.
376
Revision 1.42 2002/09/16 18:08:26 peter
377
* fix last optimization in genlinearlist, detected by bug tw1066
378
* use generic casenode.pass2 routine and override genlinearlist
379
* add jumptable support to generic casenode, by default there is
382
Revision 1.41 2002/09/09 13:57:45 jonas
383
* small optimization to case genlist() case statements
385
Revision 1.40 2002/08/17 09:23:46 florian
386
* first part of procinfo rewrite
388
Revision 1.39 2002/08/12 15:08:42 carl
389
+ stab register indexes for powerpc (moved from gdb to cpubase)
390
+ tprocessor enumeration moved to cpuinfo
391
+ linker in target_info is now a class
392
* many many updates for m68k (will soon start to compile)
393
- removed some ifdef or correct them for correct cpu
395
Revision 1.38 2002/08/11 14:32:30 peter
396
* renamed current_library to objectlibrary
398
Revision 1.37 2002/08/11 13:24:17 peter
399
* saving of asmsymbols in ppu supported
400
* asmsymbollist global is removed and moved into a new class
401
tasmlibrarydata that will hold the info of a .a file which
402
corresponds with a single module. Added librarydata to tmodule
403
to keep the library info stored for the module. In the future the
404
objectfiles will also be stored to the tasmlibrarydata class
405
* all getlabel/newasmsymbol and friends are moved to the new class
407
Revision 1.36 2002/07/23 14:31:00 daniel
408
* Added internal error when asked to generate code for 'if expr in []'
410
Revision 1.35 2002/07/20 11:58:04 florian
411
* types.pas renamed to defbase.pas because D6 contains a types
412
unit so this would conflicts if D6 programms are compiled
413
+ Willamette/SSE2 instructions to assembler added
415
Revision 1.34 2002/07/11 14:41:34 florian
416
* start of the new generic parameter handling
418
Revision 1.33 2002/07/06 20:27:26 carl
419
+ generic set handling
421
Revision 1.32 2002/07/01 18:46:33 peter
423
* reorganized aasm layer
425
Revision 1.31 2002/05/18 13:34:25 peter
426
* readded missing revisions
428
Revision 1.30 2002/05/16 19:46:52 carl
429
+ defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
430
+ try to fix temp allocation (still in ifdef)
431
+ generic constructor calls
432
+ start of tassembler / tmodulebase class cleanup
434
Revision 1.28 2002/05/13 19:54:38 peter
435
* removed n386ld and n386util units
436
* maybe_save/maybe_restore added instead of the old maybe_push
438
Revision 1.27 2002/05/12 16:53:17 peter
439
* moved entry and exitcode to ncgutil and cgobj
440
* foreach gets extra argument for passing local data to the
442
* -CR checks also class typecasts at runtime by changing them
444
* fixed compiler to cycle with the -CR option
445
* fixed stabs with elf writer, finally the global variables can
447
* removed a lot of routines from cga unit and replaced them by
449
* u32bit-s32bit updates for and,or,xor nodes. When one element is
450
u32bit then the other is typecasted also to u32bit without giving
451
a rangecheck warning/error.
452
* fixed pascal calling method with reversing also the high tree in
453
the parast, detected by tcalcst3 test
455
Revision 1.26 2002/04/25 20:16:40 peter
456
* moved more routines from cga/n386util
458
Revision 1.25 2002/04/21 19:02:07 peter
459
* removed newn and disposen nodes, the code is now directly
461
* -an option that will write the secondpass nodes to the .s file, this
462
requires EXTDEBUG define to actually write the info
463
* fixed various internal errors and crashes due recent code changes
465
Revision 1.24 2002/04/21 15:37:26 carl
466
* changeregsize -> rg.makeregsize
468
Revision 1.23 2002/04/19 15:39:35 peter
469
* removed some more routines from cga
470
* moved location_force_reg/mem to ncgutil
471
* moved arrayconstructnode secondpass to ncgld
473
Revision 1.22 2002/04/15 19:44:21 peter
474
* fixed stackcheck that would be called recursively when a stack
476
* generic changeregsize(reg,size) for i386 register resizing
477
* removed some more routines from cga unit
478
* fixed returnvalue handling
479
* fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
481
Revision 1.21 2002/04/02 17:11:36 peter
482
* tlocation,treference update
483
* LOC_CONSTANT added for better constant handling
484
* secondadd splitted in multiple routines
485
* location_force_reg added for loading a location to a register
487
* secondassignment parses now first the right and then the left node
488
(this is compatible with Kylix). This saves a lot of push/pop especially
489
with string operations
490
* adapted some routines to use the new cg methods
492
Revision 1.20 2002/03/31 20:26:39 jonas
493
+ a_loadfpu_* and a_loadmm_* methods in tcg
494
* register allocation is now handled by a class and is mostly processor
495
independent (+rgobj.pas and i386/rgcpu.pas)
496
* temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
497
* some small improvements and fixes to the optimizer
498
* some register allocation fixes
499
* some fpuvaroffset fixes in the unary minus node
500
* push/popusedregisters is now called rg.save/restoreusedregisters and
501
(for i386) uses temps instead of push/pop's when using -Op3 (that code is
502
also better optimizable)
503
* fixed and optimized register saving/restoring for new/dispose nodes
504
* LOC_FPU locations now also require their "register" field to be set to
505
R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
506
- list field removed of the tnode class because it's not used currently
507
and can cause hard-to-find bugs
229
Revision 1.78 2005/02/14 17:13:10 peter