Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/rs6000/rs6000.h @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | 77e2b8dfacca |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Definitions of target machine for GNU compiler, for IBM RS/6000. | 1 /* Definitions of target machine for GNU compiler, for IBM RS/6000. |
2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, |
4 2010, 2011 | |
4 Free Software Foundation, Inc. | 5 Free Software Foundation, Inc. |
5 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) | 6 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) |
6 | 7 |
7 This file is part of GCC. | 8 This file is part of GCC. |
8 | 9 |
26 <http://www.gnu.org/licenses/>. */ | 27 <http://www.gnu.org/licenses/>. */ |
27 | 28 |
28 /* Note that some other tm.h files include this one and then override | 29 /* Note that some other tm.h files include this one and then override |
29 many of the definitions. */ | 30 many of the definitions. */ |
30 | 31 |
32 #ifndef RS6000_OPTS_H | |
33 #include "config/rs6000/rs6000-opts.h" | |
34 #endif | |
35 | |
31 /* Definitions for the object file format. These are set at | 36 /* Definitions for the object file format. These are set at |
32 compile-time. */ | 37 compile-time. */ |
33 | 38 |
34 #define OBJECT_XCOFF 1 | 39 #define OBJECT_XCOFF 1 |
35 #define OBJECT_ELF 2 | 40 #define OBJECT_ELF 2 |
41 #define TARGET_MACOS (TARGET_OBJECT_FORMAT == OBJECT_PEF) | 46 #define TARGET_MACOS (TARGET_OBJECT_FORMAT == OBJECT_PEF) |
42 #define TARGET_MACHO (TARGET_OBJECT_FORMAT == OBJECT_MACHO) | 47 #define TARGET_MACHO (TARGET_OBJECT_FORMAT == OBJECT_MACHO) |
43 | 48 |
44 #ifndef TARGET_AIX | 49 #ifndef TARGET_AIX |
45 #define TARGET_AIX 0 | 50 #define TARGET_AIX 0 |
51 #endif | |
52 | |
53 #ifndef TARGET_AIX_OS | |
54 #define TARGET_AIX_OS 0 | |
46 #endif | 55 #endif |
47 | 56 |
48 /* Control whether function entry points use a "dot" symbol when | 57 /* Control whether function entry points use a "dot" symbol when |
49 ABI_AIX. */ | 58 ABI_AIX. */ |
50 #define DOT_SYMBOLS 1 | 59 #define DOT_SYMBOLS 1 |
158 %{mcpu=e300c2: -me300} \ | 167 %{mcpu=e300c2: -me300} \ |
159 %{mcpu=e300c3: -me300} \ | 168 %{mcpu=e300c3: -me300} \ |
160 %{mcpu=e500mc: -me500mc} \ | 169 %{mcpu=e500mc: -me500mc} \ |
161 %{mcpu=e500mc64: -me500mc64} \ | 170 %{mcpu=e500mc64: -me500mc64} \ |
162 %{maltivec: -maltivec} \ | 171 %{maltivec: -maltivec} \ |
172 %{mvsx: -mvsx %{!maltivec: -maltivec} %{!mcpu*: %(asm_cpu_power7)}} \ | |
163 -many" | 173 -many" |
164 | 174 |
165 #define CPP_DEFAULT_SPEC "" | 175 #define CPP_DEFAULT_SPEC "" |
166 | 176 |
167 #define ASM_DEFAULT_SPEC "" | 177 #define ASM_DEFAULT_SPEC "" |
291 | 301 |
292 #ifndef TARGET_SECURE_PLT | 302 #ifndef TARGET_SECURE_PLT |
293 #define TARGET_SECURE_PLT 0 | 303 #define TARGET_SECURE_PLT 0 |
294 #endif | 304 #endif |
295 | 305 |
306 #ifndef TARGET_CMODEL | |
307 #define TARGET_CMODEL CMODEL_SMALL | |
308 #endif | |
309 | |
296 #define TARGET_32BIT (! TARGET_64BIT) | 310 #define TARGET_32BIT (! TARGET_64BIT) |
297 | 311 |
298 #ifndef HAVE_AS_TLS | 312 #ifndef HAVE_AS_TLS |
299 #define HAVE_AS_TLS 0 | 313 #define HAVE_AS_TLS 0 |
300 #endif | 314 #endif |
316 /* The option machinery will define this. */ | 330 /* The option machinery will define this. */ |
317 #endif | 331 #endif |
318 | 332 |
319 #define TARGET_DEFAULT (MASK_POWER | MASK_MULTIPLE | MASK_STRING) | 333 #define TARGET_DEFAULT (MASK_POWER | MASK_MULTIPLE | MASK_STRING) |
320 | 334 |
321 /* Processor type. Order must match cpu attribute in MD file. */ | |
322 enum processor_type | |
323 { | |
324 PROCESSOR_RIOS1, | |
325 PROCESSOR_RIOS2, | |
326 PROCESSOR_RS64A, | |
327 PROCESSOR_MPCCORE, | |
328 PROCESSOR_PPC403, | |
329 PROCESSOR_PPC405, | |
330 PROCESSOR_PPC440, | |
331 PROCESSOR_PPC476, | |
332 PROCESSOR_PPC601, | |
333 PROCESSOR_PPC603, | |
334 PROCESSOR_PPC604, | |
335 PROCESSOR_PPC604e, | |
336 PROCESSOR_PPC620, | |
337 PROCESSOR_PPC630, | |
338 PROCESSOR_PPC750, | |
339 PROCESSOR_PPC7400, | |
340 PROCESSOR_PPC7450, | |
341 PROCESSOR_PPC8540, | |
342 PROCESSOR_PPCE300C2, | |
343 PROCESSOR_PPCE300C3, | |
344 PROCESSOR_PPCE500MC, | |
345 PROCESSOR_PPCE500MC64, | |
346 PROCESSOR_POWER4, | |
347 PROCESSOR_POWER5, | |
348 PROCESSOR_POWER6, | |
349 PROCESSOR_POWER7, | |
350 PROCESSOR_CELL, | |
351 PROCESSOR_PPCA2 | |
352 }; | |
353 | |
354 /* FPU operations supported. | 335 /* FPU operations supported. |
355 Each use of TARGET_SINGLE_FLOAT or TARGET_DOUBLE_FLOAT must | 336 Each use of TARGET_SINGLE_FLOAT or TARGET_DOUBLE_FLOAT must |
356 also test TARGET_HARD_FLOAT. */ | 337 also test TARGET_HARD_FLOAT. */ |
357 #define TARGET_SINGLE_FLOAT 1 | 338 #define TARGET_SINGLE_FLOAT 1 |
358 #define TARGET_DOUBLE_FLOAT 1 | 339 #define TARGET_DOUBLE_FLOAT 1 |
359 #define TARGET_SINGLE_FPU 0 | 340 #define TARGET_SINGLE_FPU 0 |
360 #define TARGET_SIMPLE_FPU 0 | 341 #define TARGET_SIMPLE_FPU 0 |
361 #define TARGET_XILINX_FPU 0 | 342 #define TARGET_XILINX_FPU 0 |
362 | 343 |
363 extern enum processor_type rs6000_cpu; | |
364 | |
365 /* Recast the processor type to the cpu attribute. */ | 344 /* Recast the processor type to the cpu attribute. */ |
366 #define rs6000_cpu_attr ((enum attr_cpu)rs6000_cpu) | 345 #define rs6000_cpu_attr ((enum attr_cpu)rs6000_cpu) |
367 | 346 |
368 /* Define generic processor types based upon current deployment. */ | 347 /* Define generic processor types based upon current deployment. */ |
369 #define PROCESSOR_COMMON PROCESSOR_PPC601 | 348 #define PROCESSOR_COMMON PROCESSOR_PPC601 |
373 | 352 |
374 /* Define the default processor. This is overridden by other tm.h files. */ | 353 /* Define the default processor. This is overridden by other tm.h files. */ |
375 #define PROCESSOR_DEFAULT PROCESSOR_RIOS1 | 354 #define PROCESSOR_DEFAULT PROCESSOR_RIOS1 |
376 #define PROCESSOR_DEFAULT64 PROCESSOR_RS64A | 355 #define PROCESSOR_DEFAULT64 PROCESSOR_RS64A |
377 | 356 |
378 /* FP processor type. */ | |
379 enum fpu_type_t | |
380 { | |
381 FPU_NONE, /* No FPU */ | |
382 FPU_SF_LITE, /* Limited Single Precision FPU */ | |
383 FPU_DF_LITE, /* Limited Double Precision FPU */ | |
384 FPU_SF_FULL, /* Full Single Precision FPU */ | |
385 FPU_DF_FULL /* Full Double Single Precision FPU */ | |
386 }; | |
387 | |
388 extern enum fpu_type_t fpu_type; | 357 extern enum fpu_type_t fpu_type; |
389 | 358 |
390 /* Specify the dialect of assembler to use. New mnemonics is dialect one | 359 /* Specify the dialect of assembler to use. New mnemonics is dialect one |
391 and the old mnemonics are dialect zero. */ | 360 and the old mnemonics are dialect zero. */ |
392 #define ASSEMBLER_DIALECT (TARGET_NEW_MNEMONICS ? 1 : 0) | 361 #define ASSEMBLER_DIALECT (TARGET_NEW_MNEMONICS ? 1 : 0) |
393 | |
394 /* Types of costly dependences. */ | |
395 enum rs6000_dependence_cost | |
396 { | |
397 max_dep_latency = 1000, | |
398 no_dep_costly, | |
399 all_deps_costly, | |
400 true_store_to_load_dep_costly, | |
401 store_to_load_dep_costly | |
402 }; | |
403 | |
404 /* Types of nop insertion schemes in sched target hook sched_finish. */ | |
405 enum rs6000_nop_insertion | |
406 { | |
407 sched_finish_regroup_exact = 1000, | |
408 sched_finish_pad_groups, | |
409 sched_finish_none | |
410 }; | |
411 | |
412 /* Dispatch group termination caused by an insn. */ | |
413 enum group_termination | |
414 { | |
415 current_group, | |
416 previous_group | |
417 }; | |
418 | 362 |
419 /* rs6000_select[0] is reserved for the default cpu defined via --with-cpu */ | 363 /* rs6000_select[0] is reserved for the default cpu defined via --with-cpu */ |
420 struct rs6000_cpu_select | 364 struct rs6000_cpu_select |
421 { | 365 { |
422 const char *string; | 366 const char *string; |
426 }; | 370 }; |
427 | 371 |
428 extern struct rs6000_cpu_select rs6000_select[]; | 372 extern struct rs6000_cpu_select rs6000_select[]; |
429 | 373 |
430 /* Debug support */ | 374 /* Debug support */ |
431 extern const char *rs6000_debug_name; /* Name for -mdebug-xxxx option */ | 375 #define MASK_DEBUG_STACK 0x01 /* debug stack applications */ |
432 extern int rs6000_debug_stack; /* debug stack applications */ | 376 #define MASK_DEBUG_ARG 0x02 /* debug argument handling */ |
433 extern int rs6000_debug_arg; /* debug argument handling */ | 377 #define MASK_DEBUG_REG 0x04 /* debug register handling */ |
434 extern int rs6000_debug_reg; /* debug register handling */ | 378 #define MASK_DEBUG_ADDR 0x08 /* debug memory addressing */ |
435 extern int rs6000_debug_addr; /* debug memory addressing */ | 379 #define MASK_DEBUG_COST 0x10 /* debug rtx codes */ |
436 extern int rs6000_debug_cost; /* debug rtx_costs */ | 380 #define MASK_DEBUG_TARGET 0x20 /* debug target attribute/pragma */ |
437 | 381 #define MASK_DEBUG_ALL (MASK_DEBUG_STACK \ |
438 #define TARGET_DEBUG_STACK rs6000_debug_stack | 382 | MASK_DEBUG_ARG \ |
439 #define TARGET_DEBUG_ARG rs6000_debug_arg | 383 | MASK_DEBUG_REG \ |
440 #define TARGET_DEBUG_REG rs6000_debug_reg | 384 | MASK_DEBUG_ADDR \ |
441 #define TARGET_DEBUG_ADDR rs6000_debug_addr | 385 | MASK_DEBUG_COST \ |
442 #define TARGET_DEBUG_COST rs6000_debug_cost | 386 | MASK_DEBUG_TARGET) |
443 | 387 |
444 extern const char *rs6000_traceback_name; /* Type of traceback table. */ | 388 #define TARGET_DEBUG_STACK (rs6000_debug & MASK_DEBUG_STACK) |
445 | 389 #define TARGET_DEBUG_ARG (rs6000_debug & MASK_DEBUG_ARG) |
446 /* These are separate from target_flags because we've run out of bits | 390 #define TARGET_DEBUG_REG (rs6000_debug & MASK_DEBUG_REG) |
447 there. */ | 391 #define TARGET_DEBUG_ADDR (rs6000_debug & MASK_DEBUG_ADDR) |
448 extern int rs6000_long_double_type_size; | 392 #define TARGET_DEBUG_COST (rs6000_debug & MASK_DEBUG_COST) |
449 extern int rs6000_ieeequad; | 393 #define TARGET_DEBUG_TARGET (rs6000_debug & MASK_DEBUG_TARGET) |
450 extern int rs6000_altivec_abi; | |
451 extern int rs6000_spe_abi; | |
452 extern int rs6000_spe; | |
453 extern int rs6000_float_gprs; | |
454 extern int rs6000_alignment_flags; | |
455 extern const char *rs6000_sched_insert_nops_str; | |
456 extern enum rs6000_nop_insertion rs6000_sched_insert_nops; | |
457 extern int rs6000_xilinx_fpu; | |
458 | |
459 /* Describe which vector unit to use for a given machine mode. */ | |
460 enum rs6000_vector { | |
461 VECTOR_NONE, /* Type is not a vector or not supported */ | |
462 VECTOR_ALTIVEC, /* Use altivec for vector processing */ | |
463 VECTOR_VSX, /* Use VSX for vector processing */ | |
464 VECTOR_PAIRED, /* Use paired floating point for vectors */ | |
465 VECTOR_SPE, /* Use SPE for vector processing */ | |
466 VECTOR_OTHER /* Some other vector unit */ | |
467 }; | |
468 | 394 |
469 extern enum rs6000_vector rs6000_vector_unit[]; | 395 extern enum rs6000_vector rs6000_vector_unit[]; |
470 | 396 |
471 #define VECTOR_UNIT_NONE_P(MODE) \ | 397 #define VECTOR_UNIT_NONE_P(MODE) \ |
472 (rs6000_vector_unit[(MODE)] == VECTOR_NONE) | 398 (rs6000_vector_unit[(MODE)] == VECTOR_NONE) |
538 #define TARGET_FPRS 1 | 464 #define TARGET_FPRS 1 |
539 #define TARGET_E500_SINGLE 0 | 465 #define TARGET_E500_SINGLE 0 |
540 #define TARGET_E500_DOUBLE 0 | 466 #define TARGET_E500_DOUBLE 0 |
541 #define CHECK_E500_OPTIONS do { } while (0) | 467 #define CHECK_E500_OPTIONS do { } while (0) |
542 | 468 |
469 /* ISA 2.01 allowed FCFID to be done in 32-bit, previously it was 64-bit only. | |
470 Enable 32-bit fcfid's on any of the switches for newer ISA machines or | |
471 XILINX. */ | |
472 #define TARGET_FCFID (TARGET_POWERPC64 \ | |
473 || TARGET_POPCNTB /* ISA 2.02 */ \ | |
474 || TARGET_CMPB /* ISA 2.05 */ \ | |
475 || TARGET_POPCNTD /* ISA 2.06 */ \ | |
476 || TARGET_XILINX_FPU) | |
477 | |
478 #define TARGET_FCTIDZ TARGET_FCFID | |
479 #define TARGET_STFIWX TARGET_PPC_GFXOPT | |
480 #define TARGET_LFIWAX TARGET_CMPB | |
481 #define TARGET_LFIWZX TARGET_POPCNTD | |
482 #define TARGET_FCFIDS TARGET_POPCNTD | |
483 #define TARGET_FCFIDU TARGET_POPCNTD | |
484 #define TARGET_FCFIDUS TARGET_POPCNTD | |
485 #define TARGET_FCTIDUZ TARGET_POPCNTD | |
486 #define TARGET_FCTIWUZ TARGET_POPCNTD | |
487 | |
543 /* E500 processors only support plain "sync", not lwsync. */ | 488 /* E500 processors only support plain "sync", not lwsync. */ |
544 #define TARGET_NO_LWSYNC TARGET_E500 | 489 #define TARGET_NO_LWSYNC TARGET_E500 |
545 | 490 |
546 /* Sometimes certain combinations of command options do not make sense | 491 /* Which machine supports the various reciprocal estimate instructions. */ |
547 on a particular target machine. You can define a macro | 492 #define TARGET_FRES (TARGET_HARD_FLOAT && TARGET_PPC_GFXOPT \ |
548 `OVERRIDE_OPTIONS' to take account of this. This macro, if | 493 && TARGET_FPRS && TARGET_SINGLE_FLOAT) |
549 defined, is executed once just after all the command options have | 494 |
550 been parsed. | 495 #define TARGET_FRE (TARGET_HARD_FLOAT && TARGET_FPRS \ |
551 | 496 && TARGET_DOUBLE_FLOAT \ |
552 Do not use this macro to turn on various extra optimizations for | 497 && (TARGET_POPCNTB || VECTOR_UNIT_VSX_P (DFmode))) |
553 `-O'. That is what `OPTIMIZATION_OPTIONS' is for. | 498 |
554 | 499 #define TARGET_FRSQRTES (TARGET_HARD_FLOAT && TARGET_POPCNTB \ |
555 On the RS/6000 this is used to define the target cpu type. */ | 500 && TARGET_FPRS && TARGET_SINGLE_FLOAT) |
556 | 501 |
557 #define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT) | 502 #define TARGET_FRSQRTE (TARGET_HARD_FLOAT && TARGET_FPRS \ |
558 | 503 && TARGET_DOUBLE_FLOAT \ |
559 /* Define this to change the optimizations performed by default. */ | 504 && (TARGET_PPC_GFXOPT || VECTOR_UNIT_VSX_P (DFmode))) |
560 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) optimization_options(LEVEL,SIZE) | 505 |
561 | 506 /* Whether the various reciprocal divide/square root estimate instructions |
562 /* Show we can debug even without a frame pointer. */ | 507 exist, and whether we should automatically generate code for the instruction |
563 #define CAN_DEBUG_WITHOUT_FP | 508 by default. */ |
509 #define RS6000_RECIP_MASK_HAVE_RE 0x1 /* have RE instruction. */ | |
510 #define RS6000_RECIP_MASK_AUTO_RE 0x2 /* generate RE by default. */ | |
511 #define RS6000_RECIP_MASK_HAVE_RSQRTE 0x4 /* have RSQRTE instruction. */ | |
512 #define RS6000_RECIP_MASK_AUTO_RSQRTE 0x8 /* gen. RSQRTE by default. */ | |
513 | |
514 extern unsigned char rs6000_recip_bits[]; | |
515 | |
516 #define RS6000_RECIP_HAVE_RE_P(MODE) \ | |
517 (rs6000_recip_bits[(int)(MODE)] & RS6000_RECIP_MASK_HAVE_RE) | |
518 | |
519 #define RS6000_RECIP_AUTO_RE_P(MODE) \ | |
520 (rs6000_recip_bits[(int)(MODE)] & RS6000_RECIP_MASK_AUTO_RE) | |
521 | |
522 #define RS6000_RECIP_HAVE_RSQRTE_P(MODE) \ | |
523 (rs6000_recip_bits[(int)(MODE)] & RS6000_RECIP_MASK_HAVE_RSQRTE) | |
524 | |
525 #define RS6000_RECIP_AUTO_RSQRTE_P(MODE) \ | |
526 (rs6000_recip_bits[(int)(MODE)] & RS6000_RECIP_MASK_AUTO_RSQRTE) | |
527 | |
528 #define RS6000_RECIP_HIGH_PRECISION_P(MODE) \ | |
529 ((MODE) == SFmode || (MODE) == V4SFmode || TARGET_RECIP_PRECISION) | |
530 | |
531 /* The default CPU for TARGET_OPTION_OVERRIDE. */ | |
532 #define OPTION_TARGET_CPU_DEFAULT TARGET_CPU_DEFAULT | |
564 | 533 |
565 /* Target pragma. */ | 534 /* Target pragma. */ |
566 #define REGISTER_TARGET_PRAGMAS() do { \ | 535 #define REGISTER_TARGET_PRAGMAS() do { \ |
567 c_register_pragma (0, "longcall", rs6000_pragma_longcall); \ | 536 c_register_pragma (0, "longcall", rs6000_pragma_longcall); \ |
537 targetm.target_option.pragma_parse = rs6000_pragma_target_parse; \ | |
568 targetm.resolve_overloaded_builtin = altivec_resolve_overloaded_builtin; \ | 538 targetm.resolve_overloaded_builtin = altivec_resolve_overloaded_builtin; \ |
569 } while (0) | 539 } while (0) |
570 | 540 |
571 /* Target #defines. */ | 541 /* Target #defines. */ |
572 #define TARGET_CPU_CPP_BUILTINS() \ | 542 #define TARGET_CPU_CPP_BUILTINS() \ |
944 r31 - r13 (saved; order given to save least number) | 914 r31 - r13 (saved; order given to save least number) |
945 r12 (not saved; if used for DImode or DFmode would use r13) | 915 r12 (not saved; if used for DImode or DFmode would use r13) |
946 mq (not saved; best to use it if we can) | 916 mq (not saved; best to use it if we can) |
947 ctr (not saved; when we have the choice ctr is better) | 917 ctr (not saved; when we have the choice ctr is better) |
948 lr (saved) | 918 lr (saved) |
949 cr5, r1, r2, ap, xer (fixed) | 919 cr5, r1, r2, ap, ca (fixed) |
950 v0 - v1 (not saved or used for anything) | 920 v0 - v1 (not saved or used for anything) |
951 v13 - v3 (not saved; incoming vector arg registers) | 921 v13 - v3 (not saved; incoming vector arg registers) |
952 v2 (not saved; incoming vector arg reg; return value) | 922 v2 (not saved; incoming vector arg reg; return value) |
953 v19 - v14 (not saved or used for anything) | 923 v19 - v14 (not saved or used for anything) |
954 v31 - v20 (saved; order given to save least number) | 924 v31 - v20 (saved; order given to save least number) |
1006 #define SPE_SIMD_REGNO_P(N) ((N) <= 31) | 976 #define SPE_SIMD_REGNO_P(N) ((N) <= 31) |
1007 | 977 |
1008 /* PAIRED SIMD registers are just the FPRs. */ | 978 /* PAIRED SIMD registers are just the FPRs. */ |
1009 #define PAIRED_SIMD_REGNO_P(N) ((N) >= 32 && (N) <= 63) | 979 #define PAIRED_SIMD_REGNO_P(N) ((N) >= 32 && (N) <= 63) |
1010 | 980 |
1011 /* True if register is the XER register. */ | 981 /* True if register is the CA register. */ |
1012 #define XER_REGNO_P(N) ((N) == XER_REGNO) | 982 #define CA_REGNO_P(N) ((N) == CA_REGNO) |
1013 | 983 |
1014 /* True if register is an AltiVec register. */ | 984 /* True if register is an AltiVec register. */ |
1015 #define ALTIVEC_REGNO_P(N) ((N) >= FIRST_ALTIVEC_REGNO && (N) <= LAST_ALTIVEC_REGNO) | 985 #define ALTIVEC_REGNO_P(N) ((N) >= FIRST_ALTIVEC_REGNO && (N) <= LAST_ALTIVEC_REGNO) |
1016 | 986 |
1017 /* True if register is a VSX register. */ | 987 /* True if register is a VSX register. */ |
1032 | 1002 |
1033 /* Return number of consecutive hard regs needed starting at reg REGNO | 1003 /* Return number of consecutive hard regs needed starting at reg REGNO |
1034 to hold something of mode MODE. */ | 1004 to hold something of mode MODE. */ |
1035 | 1005 |
1036 #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)] | 1006 #define HARD_REGNO_NREGS(REGNO, MODE) rs6000_hard_regno_nregs[(MODE)][(REGNO)] |
1007 | |
1008 /* When setting up caller-save slots (MODE == VOIDmode) ensure we allocate | |
1009 enough space to account for vectors in FP regs. */ | |
1010 #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ | |
1011 (TARGET_VSX \ | |
1012 && ((MODE) == VOIDmode || VSX_VECTOR_MODE (MODE) \ | |
1013 || ALTIVEC_VECTOR_MODE (MODE)) \ | |
1014 && FP_REGNO_P (REGNO) \ | |
1015 ? V2DFmode \ | |
1016 : choose_hard_reg_mode ((REGNO), (NREGS), false)) | |
1037 | 1017 |
1038 #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \ | 1018 #define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \ |
1039 (((TARGET_32BIT && TARGET_POWERPC64 \ | 1019 (((TARGET_32BIT && TARGET_POWERPC64 \ |
1040 && (GET_MODE_SIZE (MODE) > 4) \ | 1020 && (GET_MODE_SIZE (MODE) > 4) \ |
1041 && INT_REGNO_P (REGNO)) ? 1 : 0) \ | 1021 && INT_REGNO_P (REGNO)) ? 1 : 0) \ |
1071 || (MODE) == V1DImode \ | 1051 || (MODE) == V1DImode \ |
1072 || (MODE) == V2SImode) | 1052 || (MODE) == V2SImode) |
1073 | 1053 |
1074 #define PAIRED_VECTOR_MODE(MODE) \ | 1054 #define PAIRED_VECTOR_MODE(MODE) \ |
1075 ((MODE) == V2SFmode) | 1055 ((MODE) == V2SFmode) |
1076 | |
1077 #define UNITS_PER_SIMD_WORD(MODE) \ | |
1078 (TARGET_VSX ? UNITS_PER_VSX_WORD \ | |
1079 : (TARGET_ALTIVEC ? UNITS_PER_ALTIVEC_WORD \ | |
1080 : (TARGET_SPE ? UNITS_PER_SPE_WORD \ | |
1081 : (TARGET_PAIRED_FLOAT ? UNITS_PER_PAIRED_WORD \ | |
1082 : UNITS_PER_WORD)))) | |
1083 | 1056 |
1084 /* Value is TRUE if hard register REGNO can hold a value of | 1057 /* Value is TRUE if hard register REGNO can hold a value of |
1085 machine-mode MODE. */ | 1058 machine-mode MODE. */ |
1086 #define HARD_REGNO_MODE_OK(REGNO, MODE) \ | 1059 #define HARD_REGNO_MODE_OK(REGNO, MODE) \ |
1087 rs6000_hard_regno_mode_ok_p[(int)(MODE)][REGNO] | 1060 rs6000_hard_regno_mode_ok_p[(int)(MODE)][REGNO] |
1117 emitted the vrsave mask. */ | 1090 emitted the vrsave mask. */ |
1118 | 1091 |
1119 #define HARD_REGNO_RENAME_OK(SRC, DST) \ | 1092 #define HARD_REGNO_RENAME_OK(SRC, DST) \ |
1120 (! ALTIVEC_REGNO_P (DST) || df_regs_ever_live_p (DST)) | 1093 (! ALTIVEC_REGNO_P (DST) || df_regs_ever_live_p (DST)) |
1121 | 1094 |
1122 /* A C expression returning the cost of moving data from a register of class | |
1123 CLASS1 to one of CLASS2. */ | |
1124 | |
1125 #define REGISTER_MOVE_COST rs6000_register_move_cost | |
1126 | |
1127 /* A C expressions returning the cost of moving data of MODE from a register to | |
1128 or from memory. */ | |
1129 | |
1130 #define MEMORY_MOVE_COST rs6000_memory_move_cost | |
1131 | |
1132 /* Specify the cost of a branch insn; roughly the number of extra insns that | 1095 /* Specify the cost of a branch insn; roughly the number of extra insns that |
1133 should be added to avoid a branch. | 1096 should be added to avoid a branch. |
1134 | 1097 |
1135 Set this to 3 on the RS/6000 since that is roughly the average cost of an | 1098 Set this to 3 on the RS/6000 since that is roughly the average cost of an |
1136 unscheduled conditional branch. */ | 1099 unscheduled conditional branch. */ |
1146 with negative offsets. The 64-bit load/store instructions on the SPE | 1109 with negative offsets. The 64-bit load/store instructions on the SPE |
1147 only take positive offsets (and small ones at that), so we need to | 1110 only take positive offsets (and small ones at that), so we need to |
1148 reserve a register for consing up negative offsets. */ | 1111 reserve a register for consing up negative offsets. */ |
1149 | 1112 |
1150 #define FIXED_SCRATCH 0 | 1113 #define FIXED_SCRATCH 0 |
1151 | |
1152 /* Define this macro to change register usage conditional on target | |
1153 flags. */ | |
1154 | |
1155 #define CONDITIONAL_REGISTER_USAGE rs6000_conditional_register_usage () | |
1156 | 1114 |
1157 /* Specify the registers used for certain standard purposes. | 1115 /* Specify the registers used for certain standard purposes. |
1158 The values of these macros are register numbers. */ | 1116 The values of these macros are register numbers. */ |
1159 | 1117 |
1160 /* RS/6000 pc isn't overloaded on a register that the compiler knows about. */ | 1118 /* RS/6000 pc isn't overloaded on a register that the compiler knows about. */ |
1227 SPECIAL_REGS, | 1185 SPECIAL_REGS, |
1228 SPEC_OR_GEN_REGS, | 1186 SPEC_OR_GEN_REGS, |
1229 CR0_REGS, | 1187 CR0_REGS, |
1230 CR_REGS, | 1188 CR_REGS, |
1231 NON_FLOAT_REGS, | 1189 NON_FLOAT_REGS, |
1232 XER_REGS, | 1190 CA_REGS, |
1233 ALL_REGS, | 1191 ALL_REGS, |
1234 LIM_REG_CLASSES | 1192 LIM_REG_CLASSES |
1235 }; | 1193 }; |
1236 | 1194 |
1237 #define N_REG_CLASSES (int) LIM_REG_CLASSES | 1195 #define N_REG_CLASSES (int) LIM_REG_CLASSES |
1258 "SPECIAL_REGS", \ | 1216 "SPECIAL_REGS", \ |
1259 "SPEC_OR_GEN_REGS", \ | 1217 "SPEC_OR_GEN_REGS", \ |
1260 "CR0_REGS", \ | 1218 "CR0_REGS", \ |
1261 "CR_REGS", \ | 1219 "CR_REGS", \ |
1262 "NON_FLOAT_REGS", \ | 1220 "NON_FLOAT_REGS", \ |
1263 "XER_REGS", \ | 1221 "CA_REGS", \ |
1264 "ALL_REGS" \ | 1222 "ALL_REGS" \ |
1265 } | 1223 } |
1266 | 1224 |
1267 /* Define which registers fit in which classes. | 1225 /* Define which registers fit in which classes. |
1268 This is an initializer for a vector of HARD_REG_SET | 1226 This is an initializer for a vector of HARD_REG_SET |
1288 { 0x00000000, 0x00000000, 0x00000007, 0x00002000 }, /* SPECIAL_REGS */ \ | 1246 { 0x00000000, 0x00000000, 0x00000007, 0x00002000 }, /* SPECIAL_REGS */ \ |
1289 { 0xffffffff, 0x00000000, 0x0000000f, 0x00022000 }, /* SPEC_OR_GEN_REGS */ \ | 1247 { 0xffffffff, 0x00000000, 0x0000000f, 0x00022000 }, /* SPEC_OR_GEN_REGS */ \ |
1290 { 0x00000000, 0x00000000, 0x00000010, 0x00000000 }, /* CR0_REGS */ \ | 1248 { 0x00000000, 0x00000000, 0x00000010, 0x00000000 }, /* CR0_REGS */ \ |
1291 { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \ | 1249 { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \ |
1292 { 0xffffffff, 0x00000000, 0x0000efff, 0x00020000 }, /* NON_FLOAT_REGS */ \ | 1250 { 0xffffffff, 0x00000000, 0x0000efff, 0x00020000 }, /* NON_FLOAT_REGS */ \ |
1293 { 0x00000000, 0x00000000, 0x00001000, 0x00000000 }, /* XER_REGS */ \ | 1251 { 0x00000000, 0x00000000, 0x00001000, 0x00000000 }, /* CA_REGS */ \ |
1294 { 0xffffffff, 0xffffffff, 0xffffffff, 0x0003ffff } /* ALL_REGS */ \ | 1252 { 0xffffffff, 0xffffffff, 0xffffffff, 0x0003ffff } /* ALL_REGS */ \ |
1295 } | 1253 } |
1296 | 1254 |
1297 /* The following macro defines cover classes for Integrated Register | 1255 /* The following macro defines cover classes for Integrated Register |
1298 Allocator. Cover classes is a set of non-intersected register | 1256 Allocator. Cover classes is a set of non-intersected register |
1309 #define IRA_COVER_CLASSES_PRE_VSX \ | 1267 #define IRA_COVER_CLASSES_PRE_VSX \ |
1310 { \ | 1268 { \ |
1311 GENERAL_REGS, SPECIAL_REGS, FLOAT_REGS, ALTIVEC_REGS, /* VSX_REGS, */ \ | 1269 GENERAL_REGS, SPECIAL_REGS, FLOAT_REGS, ALTIVEC_REGS, /* VSX_REGS, */ \ |
1312 /* VRSAVE_REGS,*/ VSCR_REGS, SPE_ACC_REGS, SPEFSCR_REGS, \ | 1270 /* VRSAVE_REGS,*/ VSCR_REGS, SPE_ACC_REGS, SPEFSCR_REGS, \ |
1313 /* MQ_REGS, LINK_REGS, CTR_REGS, */ \ | 1271 /* MQ_REGS, LINK_REGS, CTR_REGS, */ \ |
1314 CR_REGS, XER_REGS, LIM_REG_CLASSES \ | 1272 CR_REGS, CA_REGS, LIM_REG_CLASSES \ |
1315 } | 1273 } |
1316 | 1274 |
1317 #define IRA_COVER_CLASSES_VSX \ | 1275 #define IRA_COVER_CLASSES_VSX \ |
1318 { \ | 1276 { \ |
1319 GENERAL_REGS, SPECIAL_REGS, /* FLOAT_REGS, ALTIVEC_REGS, */ VSX_REGS, \ | 1277 GENERAL_REGS, SPECIAL_REGS, /* FLOAT_REGS, ALTIVEC_REGS, */ VSX_REGS, \ |
1320 /* VRSAVE_REGS,*/ VSCR_REGS, SPE_ACC_REGS, SPEFSCR_REGS, \ | 1278 /* VRSAVE_REGS,*/ VSCR_REGS, SPE_ACC_REGS, SPEFSCR_REGS, \ |
1321 /* MQ_REGS, LINK_REGS, CTR_REGS, */ \ | 1279 /* MQ_REGS, LINK_REGS, CTR_REGS, */ \ |
1322 CR_REGS, XER_REGS, LIM_REG_CLASSES \ | 1280 CR_REGS, CA_REGS, LIM_REG_CLASSES \ |
1323 } | 1281 } |
1324 | 1282 |
1325 /* The same information, inverted: | 1283 /* The same information, inverted: |
1326 Return the class number of the smallest class containing | 1284 Return the class number of the smallest class containing |
1327 reg number REGNO. This could be a conditional expression | 1285 reg number REGNO. This could be a conditional expression |
1417 #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ | 1375 #define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS) \ |
1418 rs6000_cannot_change_mode_class_ptr (FROM, TO, CLASS) | 1376 rs6000_cannot_change_mode_class_ptr (FROM, TO, CLASS) |
1419 | 1377 |
1420 /* Stack layout; function entry, exit and calling. */ | 1378 /* Stack layout; function entry, exit and calling. */ |
1421 | 1379 |
1422 /* Enumeration to give which calling sequence to use. */ | |
1423 enum rs6000_abi { | |
1424 ABI_NONE, | |
1425 ABI_AIX, /* IBM's AIX */ | |
1426 ABI_V4, /* System V.4/eabi */ | |
1427 ABI_DARWIN /* Apple's Darwin (OS X kernel) */ | |
1428 }; | |
1429 | |
1430 extern enum rs6000_abi rs6000_current_abi; /* available for use by subtarget */ | |
1431 | |
1432 /* Define this if pushing a word on the stack | 1380 /* Define this if pushing a word on the stack |
1433 makes the stack pointer a smaller address. */ | 1381 makes the stack pointer a smaller address. */ |
1434 #define STACK_GROWS_DOWNWARD | 1382 #define STACK_GROWS_DOWNWARD |
1435 | 1383 |
1436 /* Offsets recorded in opcodes are a multiple of this alignment factor. */ | 1384 /* Offsets recorded in opcodes are a multiple of this alignment factor. */ |
1522 | 1470 |
1523 /* Define this if the maximum size of all the outgoing args is to be | 1471 /* Define this if the maximum size of all the outgoing args is to be |
1524 accumulated and pushed during the prologue. The amount can be | 1472 accumulated and pushed during the prologue. The amount can be |
1525 found in the variable crtl->outgoing_args_size. */ | 1473 found in the variable crtl->outgoing_args_size. */ |
1526 #define ACCUMULATE_OUTGOING_ARGS 1 | 1474 #define ACCUMULATE_OUTGOING_ARGS 1 |
1527 | |
1528 /* Value is the number of bytes of arguments automatically | |
1529 popped when returning from a subroutine call. | |
1530 FUNDECL is the declaration node of the function (as a tree), | |
1531 FUNTYPE is the data type of the function (as a tree), | |
1532 or for a library call it is an identifier node for the subroutine name. | |
1533 SIZE is the number of bytes of arguments passed on the stack. */ | |
1534 | |
1535 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 | |
1536 | 1475 |
1537 /* Define how to find the value returned by a library function | 1476 /* Define how to find the value returned by a library function |
1538 assuming the value has mode MODE. */ | 1477 assuming the value has mode MODE. */ |
1539 | 1478 |
1540 #define LIBCALL_VALUE(MODE) rs6000_libcall_value ((MODE)) | 1479 #define LIBCALL_VALUE(MODE) rs6000_libcall_value ((MODE)) |
1636 int stdarg; /* Whether function is a stdarg function. */ | 1575 int stdarg; /* Whether function is a stdarg function. */ |
1637 int call_cookie; /* Do special things for this call */ | 1576 int call_cookie; /* Do special things for this call */ |
1638 int sysv_gregno; /* next available GP register */ | 1577 int sysv_gregno; /* next available GP register */ |
1639 int intoffset; /* running offset in struct (darwin64) */ | 1578 int intoffset; /* running offset in struct (darwin64) */ |
1640 int use_stack; /* any part of struct on stack (darwin64) */ | 1579 int use_stack; /* any part of struct on stack (darwin64) */ |
1580 int floats_in_gpr; /* count of SFmode floats taking up | |
1581 GPR space (darwin64) */ | |
1641 int named; /* false for varargs params */ | 1582 int named; /* false for varargs params */ |
1583 int escapes; /* if function visible outside tu */ | |
1642 } CUMULATIVE_ARGS; | 1584 } CUMULATIVE_ARGS; |
1643 | 1585 |
1644 /* Initialize a variable CUM of type CUMULATIVE_ARGS | 1586 /* Initialize a variable CUM of type CUMULATIVE_ARGS |
1645 for a call to a function whose data type is FNTYPE. | 1587 for a call to a function whose data type is FNTYPE. |
1646 For a library call, FNTYPE is 0. */ | 1588 For a library call, FNTYPE is 0. */ |
1647 | 1589 |
1648 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ | 1590 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ |
1649 init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, FALSE, N_NAMED_ARGS) | 1591 init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, FALSE, \ |
1592 N_NAMED_ARGS, FNDECL, VOIDmode) | |
1650 | 1593 |
1651 /* Similar, but when scanning the definition of a procedure. We always | 1594 /* Similar, but when scanning the definition of a procedure. We always |
1652 set NARGS_PROTOTYPE large so we never return an EXPR_LIST. */ | 1595 set NARGS_PROTOTYPE large so we never return an EXPR_LIST. */ |
1653 | 1596 |
1654 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ | 1597 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ |
1655 init_cumulative_args (&CUM, FNTYPE, LIBNAME, TRUE, FALSE, 1000) | 1598 init_cumulative_args (&CUM, FNTYPE, LIBNAME, TRUE, FALSE, \ |
1599 1000, current_function_decl, VOIDmode) | |
1656 | 1600 |
1657 /* Like INIT_CUMULATIVE_ARGS' but only used for outgoing libcalls. */ | 1601 /* Like INIT_CUMULATIVE_ARGS' but only used for outgoing libcalls. */ |
1658 | 1602 |
1659 #define INIT_CUMULATIVE_LIBCALL_ARGS(CUM, MODE, LIBNAME) \ | 1603 #define INIT_CUMULATIVE_LIBCALL_ARGS(CUM, MODE, LIBNAME) \ |
1660 init_cumulative_args (&CUM, NULL_TREE, LIBNAME, FALSE, TRUE, 0) | 1604 init_cumulative_args (&CUM, NULL_TREE, LIBNAME, FALSE, TRUE, \ |
1661 | 1605 0, NULL_TREE, MODE) |
1662 /* Update the data in CUM to advance over an argument | |
1663 of mode MODE and data type TYPE. | |
1664 (TYPE is null for libcalls where that information may not be available.) */ | |
1665 | |
1666 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ | |
1667 function_arg_advance (&CUM, MODE, TYPE, NAMED, 0) | |
1668 | |
1669 /* Determine where to put an argument to a function. | |
1670 Value is zero to push the argument on the stack, | |
1671 or a hard register in which to store the argument. | |
1672 | |
1673 MODE is the argument's machine mode. | |
1674 TYPE is the data type of the argument (as a tree). | |
1675 This is null for libcalls where that information may | |
1676 not be available. | |
1677 CUM is a variable of type CUMULATIVE_ARGS which gives info about | |
1678 the preceding args and about the function being called. | |
1679 NAMED is nonzero if this argument is a named parameter | |
1680 (otherwise it is an extra parameter matching an ellipsis). | |
1681 | |
1682 On RS/6000 the first eight words of non-FP are normally in registers | |
1683 and the rest are pushed. The first 13 FP args are in registers. | |
1684 | |
1685 If this is floating-point and no prototype is specified, we use | |
1686 both an FP and integer register (or possibly FP reg and stack). Library | |
1687 functions (when TYPE is zero) always have the proper types for args, | |
1688 so we can pass the FP value just in one register. emit_library_function | |
1689 doesn't support EXPR_LIST anyway. */ | |
1690 | |
1691 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ | |
1692 function_arg (&CUM, MODE, TYPE, NAMED) | |
1693 | 1606 |
1694 /* If defined, a C expression which determines whether, and in which | 1607 /* If defined, a C expression which determines whether, and in which |
1695 direction, to pad out an argument with extra space. The value | 1608 direction, to pad out an argument with extra space. The value |
1696 should be of type `enum direction': either `upward' to pad above | 1609 should be of type `enum direction': either `upward' to pad above |
1697 the argument, `downward' to pad below, or `none' to inhibit | 1610 the argument, `downward' to pad below, or `none' to inhibit |
1698 padding. */ | 1611 padding. */ |
1699 | 1612 |
1700 #define FUNCTION_ARG_PADDING(MODE, TYPE) function_arg_padding (MODE, TYPE) | 1613 #define FUNCTION_ARG_PADDING(MODE, TYPE) function_arg_padding (MODE, TYPE) |
1701 | |
1702 /* If defined, a C expression that gives the alignment boundary, in bits, | |
1703 of an argument with the specified mode and type. If it is not defined, | |
1704 PARM_BOUNDARY is used for all arguments. */ | |
1705 | |
1706 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ | |
1707 function_arg_boundary (MODE, TYPE) | |
1708 | 1614 |
1709 #define PAD_VARARGS_DOWN \ | 1615 #define PAD_VARARGS_DOWN \ |
1710 (FUNCTION_ARG_PADDING (TYPE_MODE (type), type) == downward) | 1616 (FUNCTION_ARG_PADDING (TYPE_MODE (type), type) == downward) |
1711 | 1617 |
1712 /* Output assembler code to FILE to increment profiler label # LABELNO | 1618 /* Output assembler code to FILE to increment profiler label # LABELNO |
1888 int win; \ | 1794 int win; \ |
1889 (X) = rs6000_legitimize_reload_address_ptr ((X), (MODE), (OPNUM), \ | 1795 (X) = rs6000_legitimize_reload_address_ptr ((X), (MODE), (OPNUM), \ |
1890 (int)(TYPE), (IND_LEVELS), &win); \ | 1796 (int)(TYPE), (IND_LEVELS), &win); \ |
1891 if ( win ) \ | 1797 if ( win ) \ |
1892 goto WIN; \ | 1798 goto WIN; \ |
1893 } while (0) | |
1894 | |
1895 /* Go to LABEL if ADDR (a legitimate address expression) | |
1896 has an effect that depends on the machine mode it is used for. */ | |
1897 | |
1898 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ | |
1899 do { \ | |
1900 if (rs6000_mode_dependent_address_ptr (ADDR)) \ | |
1901 goto LABEL; \ | |
1902 } while (0) | 1799 } while (0) |
1903 | 1800 |
1904 #define FIND_BASE_TERM rs6000_find_base_term | 1801 #define FIND_BASE_TERM rs6000_find_base_term |
1905 | 1802 |
1906 /* The register number of the register used to address a table of | 1803 /* The register number of the register used to address a table of |
2266 &rs6000_reg_names[72][0], /* cr4 */ \ | 2163 &rs6000_reg_names[72][0], /* cr4 */ \ |
2267 &rs6000_reg_names[73][0], /* cr5 */ \ | 2164 &rs6000_reg_names[73][0], /* cr5 */ \ |
2268 &rs6000_reg_names[74][0], /* cr6 */ \ | 2165 &rs6000_reg_names[74][0], /* cr6 */ \ |
2269 &rs6000_reg_names[75][0], /* cr7 */ \ | 2166 &rs6000_reg_names[75][0], /* cr7 */ \ |
2270 \ | 2167 \ |
2271 &rs6000_reg_names[76][0], /* xer */ \ | 2168 &rs6000_reg_names[76][0], /* ca */ \ |
2272 \ | 2169 \ |
2273 &rs6000_reg_names[77][0], /* v0 */ \ | 2170 &rs6000_reg_names[77][0], /* v0 */ \ |
2274 &rs6000_reg_names[78][0], /* v1 */ \ | 2171 &rs6000_reg_names[78][0], /* v1 */ \ |
2275 &rs6000_reg_names[79][0], /* v2 */ \ | 2172 &rs6000_reg_names[79][0], /* v2 */ \ |
2276 &rs6000_reg_names[80][0], /* v3 */ \ | 2173 &rs6000_reg_names[80][0], /* v3 */ \ |
2340 {"spe_acc", 111}, {"spefscr", 112}, \ | 2237 {"spe_acc", 111}, {"spefscr", 112}, \ |
2341 /* no additional names for: mq, lr, ctr, ap */ \ | 2238 /* no additional names for: mq, lr, ctr, ap */ \ |
2342 {"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \ | 2239 {"cr0", 68}, {"cr1", 69}, {"cr2", 70}, {"cr3", 71}, \ |
2343 {"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}, \ | 2240 {"cr4", 72}, {"cr5", 73}, {"cr6", 74}, {"cr7", 75}, \ |
2344 {"cc", 68}, {"sp", 1}, {"toc", 2}, \ | 2241 {"cc", 68}, {"sp", 1}, {"toc", 2}, \ |
2242 /* CA is only part of XER, but we do not model the other parts (yet). */ \ | |
2243 {"xer", 76}, \ | |
2345 /* VSX registers overlaid on top of FR, Altivec registers */ \ | 2244 /* VSX registers overlaid on top of FR, Altivec registers */ \ |
2346 {"vs0", 32}, {"vs1", 33}, {"vs2", 34}, {"vs3", 35}, \ | 2245 {"vs0", 32}, {"vs1", 33}, {"vs2", 34}, {"vs3", 35}, \ |
2347 {"vs4", 36}, {"vs5", 37}, {"vs6", 38}, {"vs7", 39}, \ | 2246 {"vs4", 36}, {"vs5", 37}, {"vs6", 38}, {"vs7", 39}, \ |
2348 {"vs8", 40}, {"vs9", 41}, {"vs10", 42}, {"vs11", 43}, \ | 2247 {"vs8", 40}, {"vs9", 41}, {"vs10", 42}, {"vs11", 43}, \ |
2349 {"vs12", 44}, {"vs13", 45}, {"vs14", 46}, {"vs15", 47}, \ | 2248 {"vs12", 44}, {"vs13", 45}, {"vs14", 46}, {"vs15", 47}, \ |
2383 | 2282 |
2384 #define ASM_OUTPUT_ALIGN(FILE,LOG) \ | 2283 #define ASM_OUTPUT_ALIGN(FILE,LOG) \ |
2385 if ((LOG) != 0) \ | 2284 if ((LOG) != 0) \ |
2386 fprintf (FILE, "\t.align %d\n", (LOG)) | 2285 fprintf (FILE, "\t.align %d\n", (LOG)) |
2387 | 2286 |
2287 /* How to align the given loop. */ | |
2288 #define LOOP_ALIGN(LABEL) rs6000_loop_align(LABEL) | |
2289 | |
2388 /* Pick up the return address upon entry to a procedure. Used for | 2290 /* Pick up the return address upon entry to a procedure. Used for |
2389 dwarf2 unwind information. This also enables the table driven | 2291 dwarf2 unwind information. This also enables the table driven |
2390 mechanism. */ | 2292 mechanism. */ |
2391 | 2293 |
2392 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, LR_REGNO) | 2294 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, LR_REGNO) |
2408 ((CODE) == '.' || (CODE) == '&') | 2310 ((CODE) == '.' || (CODE) == '&') |
2409 | 2311 |
2410 /* Print a memory address as an operand to reference that memory location. */ | 2312 /* Print a memory address as an operand to reference that memory location. */ |
2411 | 2313 |
2412 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) | 2314 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR) |
2413 | |
2414 #define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \ | |
2415 do \ | |
2416 if (!rs6000_output_addr_const_extra (STREAM, X)) \ | |
2417 goto FAIL; \ | |
2418 while (0) | |
2419 | 2315 |
2420 /* uncomment for disabling the corresponding default options */ | 2316 /* uncomment for disabling the corresponding default options */ |
2421 /* #define MACHINE_no_sched_interblock */ | 2317 /* #define MACHINE_no_sched_interblock */ |
2422 /* #define MACHINE_no_sched_speculative */ | 2318 /* #define MACHINE_no_sched_speculative */ |
2423 /* #define MACHINE_no_sched_speculative_load */ | 2319 /* #define MACHINE_no_sched_speculative_load */ |
2424 | 2320 |
2425 /* General flags. */ | 2321 /* General flags. */ |
2426 extern int flag_pic; | |
2427 extern int optimize; | |
2428 extern int flag_expensive_optimizations; | |
2429 extern int frame_pointer_needed; | 2322 extern int frame_pointer_needed; |
2430 | 2323 |
2431 /* Classification of the builtin functions to properly set the declaration tree | 2324 /* Classification of the builtin functions to properly set the declaration tree |
2432 flags. */ | 2325 flags. */ |
2433 enum rs6000_btc | 2326 enum rs6000_btc |
2487 RS6000_BTI_bool_V4SI, /* __vector __bool int */ | 2380 RS6000_BTI_bool_V4SI, /* __vector __bool int */ |
2488 RS6000_BTI_bool_V2DI, /* __vector __bool long */ | 2381 RS6000_BTI_bool_V2DI, /* __vector __bool long */ |
2489 RS6000_BTI_pixel_V8HI, /* __vector __pixel */ | 2382 RS6000_BTI_pixel_V8HI, /* __vector __pixel */ |
2490 RS6000_BTI_long, /* long_integer_type_node */ | 2383 RS6000_BTI_long, /* long_integer_type_node */ |
2491 RS6000_BTI_unsigned_long, /* long_unsigned_type_node */ | 2384 RS6000_BTI_unsigned_long, /* long_unsigned_type_node */ |
2385 RS6000_BTI_long_long, /* long_long_integer_type_node */ | |
2386 RS6000_BTI_unsigned_long_long, /* long_long_unsigned_type_node */ | |
2492 RS6000_BTI_INTQI, /* intQI_type_node */ | 2387 RS6000_BTI_INTQI, /* intQI_type_node */ |
2493 RS6000_BTI_UINTQI, /* unsigned_intQI_type_node */ | 2388 RS6000_BTI_UINTQI, /* unsigned_intQI_type_node */ |
2494 RS6000_BTI_INTHI, /* intHI_type_node */ | 2389 RS6000_BTI_INTHI, /* intHI_type_node */ |
2495 RS6000_BTI_UINTHI, /* unsigned_intHI_type_node */ | 2390 RS6000_BTI_UINTHI, /* unsigned_intHI_type_node */ |
2496 RS6000_BTI_INTSI, /* intSI_type_node */ | 2391 RS6000_BTI_INTSI, /* intSI_type_node */ |
2530 #define bool_V8HI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V8HI]) | 2425 #define bool_V8HI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V8HI]) |
2531 #define bool_V4SI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V4SI]) | 2426 #define bool_V4SI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V4SI]) |
2532 #define bool_V2DI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V2DI]) | 2427 #define bool_V2DI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V2DI]) |
2533 #define pixel_V8HI_type_node (rs6000_builtin_types[RS6000_BTI_pixel_V8HI]) | 2428 #define pixel_V8HI_type_node (rs6000_builtin_types[RS6000_BTI_pixel_V8HI]) |
2534 | 2429 |
2430 #define long_long_integer_type_internal_node (rs6000_builtin_types[RS6000_BTI_long_long]) | |
2431 #define long_long_unsigned_type_internal_node (rs6000_builtin_types[RS6000_BTI_unsigned_long_long]) | |
2535 #define long_integer_type_internal_node (rs6000_builtin_types[RS6000_BTI_long]) | 2432 #define long_integer_type_internal_node (rs6000_builtin_types[RS6000_BTI_long]) |
2536 #define long_unsigned_type_internal_node (rs6000_builtin_types[RS6000_BTI_unsigned_long]) | 2433 #define long_unsigned_type_internal_node (rs6000_builtin_types[RS6000_BTI_unsigned_long]) |
2537 #define intQI_type_internal_node (rs6000_builtin_types[RS6000_BTI_INTQI]) | 2434 #define intQI_type_internal_node (rs6000_builtin_types[RS6000_BTI_INTQI]) |
2538 #define uintQI_type_internal_node (rs6000_builtin_types[RS6000_BTI_UINTQI]) | 2435 #define uintQI_type_internal_node (rs6000_builtin_types[RS6000_BTI_UINTQI]) |
2539 #define intHI_type_internal_node (rs6000_builtin_types[RS6000_BTI_INTHI]) | 2436 #define intHI_type_internal_node (rs6000_builtin_types[RS6000_BTI_INTHI]) |