Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/pa/pa.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 the HP Spectrum. | 1 /* Definitions of target machine for GNU compiler, for the HP Spectrum. |
2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, | 2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
3 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support | 5 Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support |
6 and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for | 6 and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for |
7 Software Science at the University of Utah. | 7 Software Science at the University of Utah. |
8 | 8 |
84 /* HP-UX 11i multibyte and UNIX 98 extensions. */ | 84 /* HP-UX 11i multibyte and UNIX 98 extensions. */ |
85 #ifndef TARGET_HPUX_11_11 | 85 #ifndef TARGET_HPUX_11_11 |
86 #define TARGET_HPUX_11_11 0 | 86 #define TARGET_HPUX_11_11 0 |
87 #endif | 87 #endif |
88 | 88 |
89 /* HP-UX long double library. */ | |
90 #ifndef HPUX_LONG_DOUBLE_LIBRARY | |
91 #define HPUX_LONG_DOUBLE_LIBRARY 0 | |
92 #endif | |
93 | |
89 /* The following three defines are potential target switches. The current | 94 /* The following three defines are potential target switches. The current |
90 defines are optimal given the current capabilities of GAS and GNU ld. */ | 95 defines are optimal given the current capabilities of GAS and GNU ld. */ |
91 | 96 |
92 /* Define to a C expression evaluating to true to use long absolute calls. | 97 /* Define to a C expression evaluating to true to use long absolute calls. |
93 Currently, only the HP assembler and SOM linker support long absolute | 98 Currently, only the HP assembler and SOM linker support long absolute |
142 {"schedule", "%{!mschedule=*:-mschedule=%(VALUE)}" } | 147 {"schedule", "%{!mschedule=*:-mschedule=%(VALUE)}" } |
143 | 148 |
144 /* Specify the dialect of assembler to use. New mnemonics is dialect one | 149 /* Specify the dialect of assembler to use. New mnemonics is dialect one |
145 and the old mnemonics are dialect zero. */ | 150 and the old mnemonics are dialect zero. */ |
146 #define ASSEMBLER_DIALECT (TARGET_PA_20 ? 1 : 0) | 151 #define ASSEMBLER_DIALECT (TARGET_PA_20 ? 1 : 0) |
147 | |
148 #define OVERRIDE_OPTIONS override_options () | |
149 | 152 |
150 /* Override some settings from dbxelf.h. */ | 153 /* Override some settings from dbxelf.h. */ |
151 | 154 |
152 /* We do not have to be compatible with dbx, so we enable gdb extensions | 155 /* We do not have to be compatible with dbx, so we enable gdb extensions |
153 by default. */ | 156 by default. */ |
220 /* We don't want -lg. */ | 223 /* We don't want -lg. */ |
221 #ifndef LIB_SPEC | 224 #ifndef LIB_SPEC |
222 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" | 225 #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" |
223 #endif | 226 #endif |
224 | 227 |
225 /* This macro defines command-line switches that modify the default | |
226 target name. | |
227 | |
228 The definition is be an initializer for an array of structures. Each | |
229 array element has have three elements: the switch name, one of the | |
230 enumeration codes ADD or DELETE to indicate whether the string should be | |
231 inserted or deleted, and the string to be inserted or deleted. */ | |
232 #define MODIFY_TARGET_NAME {{"-32", DELETE, "64"}, {"-64", ADD, "64"}} | |
233 | |
234 /* Make gcc agree with <machine/ansi.h> */ | 228 /* Make gcc agree with <machine/ansi.h> */ |
235 | 229 |
236 #define SIZE_TYPE "unsigned int" | 230 #define SIZE_TYPE "unsigned int" |
237 #define PTRDIFF_TYPE "int" | 231 #define PTRDIFF_TYPE "int" |
238 #define WCHAR_TYPE "unsigned int" | 232 #define WCHAR_TYPE "unsigned int" |
239 #define WCHAR_TYPE_SIZE 32 | 233 #define WCHAR_TYPE_SIZE 32 |
240 | |
241 /* Show we can debug even without a frame pointer. */ | |
242 #define CAN_DEBUG_WITHOUT_FP | |
243 | 234 |
244 /* target machine storage layout */ | 235 /* target machine storage layout */ |
245 typedef struct GTY(()) machine_function | 236 typedef struct GTY(()) machine_function |
246 { | 237 { |
247 /* Flag indicating that a .NSUBSPA directive has been output for | 238 /* Flag indicating that a .NSUBSPA directive has been output for |
323 | 314 |
324 /* No data type wants to be aligned rounder than this. */ | 315 /* No data type wants to be aligned rounder than this. */ |
325 #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD) | 316 #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD) |
326 | 317 |
327 /* Get around hp-ux assembler bug, and make strcpy of constants fast. */ | 318 /* Get around hp-ux assembler bug, and make strcpy of constants fast. */ |
328 #define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ | 319 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ |
329 ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN)) | 320 (TREE_CODE (EXP) == STRING_CST \ |
321 && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) | |
330 | 322 |
331 /* Make arrays of chars word-aligned for the same reasons. */ | 323 /* Make arrays of chars word-aligned for the same reasons. */ |
332 #define DATA_ALIGNMENT(TYPE, ALIGN) \ | 324 #define DATA_ALIGNMENT(TYPE, ALIGN) \ |
333 (TREE_CODE (TYPE) == ARRAY_TYPE \ | 325 (TREE_CODE (TYPE) == ARRAY_TYPE \ |
334 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ | 326 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ |
352 /* #define PC_REGNUM */ | 344 /* #define PC_REGNUM */ |
353 | 345 |
354 /* Register to use for pushing function arguments. */ | 346 /* Register to use for pushing function arguments. */ |
355 #define STACK_POINTER_REGNUM 30 | 347 #define STACK_POINTER_REGNUM 30 |
356 | 348 |
349 /* Fixed register for local variable access. Always eliminated. */ | |
350 #define FRAME_POINTER_REGNUM (TARGET_64BIT ? 61 : 89) | |
351 | |
357 /* Base register for access to local variables of the function. */ | 352 /* Base register for access to local variables of the function. */ |
358 #define FRAME_POINTER_REGNUM 3 | 353 #define HARD_FRAME_POINTER_REGNUM 3 |
359 | 354 |
360 /* Don't allow hard registers to be renamed into r2 unless r2 | 355 /* Don't allow hard registers to be renamed into r2 unless r2 |
361 is already live or already being saved (due to eh). */ | 356 is already live or already being saved (due to eh). */ |
362 | 357 |
363 #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \ | 358 #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \ |
364 ((NEW_REG) != 2 || df_regs_ever_live_p (2) || crtl->calls_eh_return) | 359 ((NEW_REG) != 2 || df_regs_ever_live_p (2) || crtl->calls_eh_return) |
365 | |
366 /* C statement to store the difference between the frame pointer | |
367 and the stack pointer values immediately after the function prologue. | |
368 | |
369 Note, we always pretend that this is a leaf function because if | |
370 it's not, there's no point in trying to eliminate the | |
371 frame pointer. If it is a leaf function, we guessed right! */ | |
372 #define INITIAL_FRAME_POINTER_OFFSET(VAR) \ | |
373 do {(VAR) = - compute_frame_size (get_frame_size (), 0);} while (0) | |
374 | 360 |
375 /* Base register for access to arguments of the function. */ | 361 /* Base register for access to arguments of the function. */ |
376 #define ARG_POINTER_REGNUM (TARGET_64BIT ? 29 : 3) | 362 #define ARG_POINTER_REGNUM (TARGET_64BIT ? 29 : 3) |
377 | 363 |
378 /* Register in which static-chain is passed to a function. */ | 364 /* Register in which static-chain is passed to a function. */ |
392 #define DEFAULT_PCC_STRUCT_RETURN 0 | 378 #define DEFAULT_PCC_STRUCT_RETURN 0 |
393 | 379 |
394 /* Register in which address to store a structure value | 380 /* Register in which address to store a structure value |
395 is passed to a function. */ | 381 is passed to a function. */ |
396 #define PA_STRUCT_VALUE_REGNUM 28 | 382 #define PA_STRUCT_VALUE_REGNUM 28 |
383 | |
384 /* Definitions for register eliminations. | |
385 | |
386 We have two registers that can be eliminated. First, the frame pointer | |
387 register can often be eliminated in favor of the stack pointer register. | |
388 Secondly, the argument pointer register can always be eliminated in the | |
389 32-bit runtimes. */ | |
390 | |
391 /* This is an array of structures. Each structure initializes one pair | |
392 of eliminable registers. The "from" register number is given first, | |
393 followed by "to". Eliminations of the same "from" register are listed | |
394 in order of preference. | |
395 | |
396 The argument pointer cannot be eliminated in the 64-bit runtime. It | |
397 is the same register as the hard frame pointer in the 32-bit runtime. | |
398 So, it does not need to be listed. */ | |
399 #define ELIMINABLE_REGS \ | |
400 {{ HARD_FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ | |
401 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ | |
402 { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} } | |
403 | |
404 /* Define the offset between two registers, one to be eliminated, | |
405 and the other its replacement, at the start of a routine. */ | |
406 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ | |
407 ((OFFSET) = pa_initial_elimination_offset(FROM, TO)) | |
397 | 408 |
398 /* Describe how we implement __builtin_eh_return. */ | 409 /* Describe how we implement __builtin_eh_return. */ |
399 #define EH_RETURN_DATA_REGNO(N) \ | 410 #define EH_RETURN_DATA_REGNO(N) \ |
400 ((N) < 3 ? (N) + 20 : (N) == 3 ? 31 : INVALID_REGNUM) | 411 ((N) < 3 ? (N) + 20 : (N) == 3 ? 31 : INVALID_REGNUM) |
401 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 29) | 412 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 29) |
402 #define EH_RETURN_HANDLER_RTX pa_eh_return_handler_rtx () | 413 #define EH_RETURN_HANDLER_RTX pa_eh_return_handler_rtx () |
403 | 414 |
404 /* Offset from the frame pointer register value to the top of stack. */ | 415 /* Offset from the frame pointer register value to the top of stack. */ |
405 #define FRAME_POINTER_CFA_OFFSET(FNDECL) 0 | 416 #define FRAME_POINTER_CFA_OFFSET(FNDECL) 0 |
417 | |
418 /* The maximum number of hard registers that can be saved in the call | |
419 frame. The soft frame pointer is not included. */ | |
420 #define DWARF_FRAME_REGISTERS (FIRST_PSEUDO_REGISTER - 1) | |
406 | 421 |
407 /* A C expression whose value is RTL representing the location of the | 422 /* A C expression whose value is RTL representing the location of the |
408 incoming return address at the beginning of any function, before the | 423 incoming return address at the beginning of any function, before the |
409 prologue. You only need to define this macro if you want to support | 424 prologue. You only need to define this macro if you want to support |
410 call frame debugging information like that provided by DWARF 2. */ | 425 call frame debugging information like that provided by DWARF 2. */ |
416 be defined only if DWARF_FRAME_RETURN_COLUMN is set to a general | 431 be defined only if DWARF_FRAME_RETURN_COLUMN is set to a general |
417 register, but an alternate column needs to be used for signal frames. | 432 register, but an alternate column needs to be used for signal frames. |
418 | 433 |
419 Column 0 is not used but unfortunately its register size is set to | 434 Column 0 is not used but unfortunately its register size is set to |
420 4 bytes (sizeof CCmode) so it can't be used on 64-bit targets. */ | 435 4 bytes (sizeof CCmode) so it can't be used on 64-bit targets. */ |
421 #define DWARF_ALT_FRAME_RETURN_COLUMN FIRST_PSEUDO_REGISTER | 436 #define DWARF_ALT_FRAME_RETURN_COLUMN (FIRST_PSEUDO_REGISTER - 1) |
422 | 437 |
423 /* This macro chooses the encoding of pointers embedded in the exception | 438 /* This macro chooses the encoding of pointers embedded in the exception |
424 handling sections. If at all possible, this should be defined such | 439 handling sections. If at all possible, this should be defined such |
425 that the exception handling section will not require dynamic relocations, | 440 that the exception handling section will not require dynamic relocations, |
426 and so may be read-only. | 441 and so may be read-only. |
476 ((CLASS) == FP_REGS || (CLASS) == FPUPPER_REGS) | 491 ((CLASS) == FP_REGS || (CLASS) == FPUPPER_REGS) |
477 | 492 |
478 /* True if register is floating-point. */ | 493 /* True if register is floating-point. */ |
479 #define FP_REGNO_P(N) ((N) >= FP_REG_FIRST && (N) <= FP_REG_LAST) | 494 #define FP_REGNO_P(N) ((N) >= FP_REG_FIRST && (N) <= FP_REG_LAST) |
480 | 495 |
481 /* Given an rtx X being reloaded into a reg required to be | |
482 in class CLASS, return the class of reg to actually use. | |
483 In general this is just CLASS; but on some machines | |
484 in some cases it is preferable to use a more restrictive class. */ | |
485 #define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) | |
486 | |
487 #define MAYBE_FP_REG_CLASS_P(CLASS) \ | 496 #define MAYBE_FP_REG_CLASS_P(CLASS) \ |
488 reg_classes_intersect_p ((CLASS), FP_REGS) | 497 reg_classes_intersect_p ((CLASS), FP_REGS) |
489 | 498 |
490 | 499 |
491 /* Stack layout; function entry, exit and calling. */ | 500 /* Stack layout; function entry, exit and calling. */ |
559 | 568 |
560 #define STACK_DYNAMIC_OFFSET(FNDECL) \ | 569 #define STACK_DYNAMIC_OFFSET(FNDECL) \ |
561 (TARGET_64BIT \ | 570 (TARGET_64BIT \ |
562 ? (STACK_POINTER_OFFSET) \ | 571 ? (STACK_POINTER_OFFSET) \ |
563 : ((STACK_POINTER_OFFSET) - crtl->outgoing_args_size)) | 572 : ((STACK_POINTER_OFFSET) - crtl->outgoing_args_size)) |
564 | |
565 /* Value is 1 if returning from a function call automatically | |
566 pops the arguments described by the number-of-args field in the call. | |
567 FUNDECL is the declaration node of the function (as a tree), | |
568 FUNTYPE is the data type of the function (as a tree), | |
569 or for a library call it is an identifier node for the subroutine name. */ | |
570 | |
571 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 | |
572 | |
573 /* Define how to find the value returned by a library function | |
574 assuming the value has mode MODE. */ | |
575 | |
576 #define LIBCALL_VALUE(MODE) \ | |
577 gen_rtx_REG (MODE, \ | |
578 (! TARGET_SOFT_FLOAT \ | |
579 && ((MODE) == SFmode || (MODE) == DFmode) ? 32 : 28)) | |
580 | |
581 /* 1 if N is a possible register number for a function value | |
582 as seen by the caller. */ | |
583 | |
584 #define FUNCTION_VALUE_REGNO_P(N) \ | |
585 ((N) == 28 || (! TARGET_SOFT_FLOAT && (N) == 32)) | |
586 | 573 |
587 | 574 |
588 /* Define a data type for recording info about an argument list | 575 /* Define a data type for recording info about an argument list |
589 during the scan of that argument list. This data type should | 576 during the scan of that argument list. This data type should |
590 hold all necessary information about the function itself | 577 hold all necessary information about the function itself |
615 | 602 |
616 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ | 603 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ |
617 (CUM).words = 0, \ | 604 (CUM).words = 0, \ |
618 (CUM).incoming = 0, \ | 605 (CUM).incoming = 0, \ |
619 (CUM).indirect = (FNTYPE) && !(FNDECL), \ | 606 (CUM).indirect = (FNTYPE) && !(FNDECL), \ |
620 (CUM).nargs_prototype = (FNTYPE && TYPE_ARG_TYPES (FNTYPE) \ | 607 (CUM).nargs_prototype = (FNTYPE && prototype_p (FNTYPE) \ |
621 ? (list_length (TYPE_ARG_TYPES (FNTYPE)) - 1 \ | 608 ? (list_length (TYPE_ARG_TYPES (FNTYPE)) - 1 \ |
622 + (TYPE_MODE (TREE_TYPE (FNTYPE)) == BLKmode \ | 609 + (TYPE_MODE (TREE_TYPE (FNTYPE)) == BLKmode \ |
623 || pa_return_in_memory (TREE_TYPE (FNTYPE), 0))) \ | 610 || pa_return_in_memory (TREE_TYPE (FNTYPE), 0))) \ |
624 : 0) | 611 : 0) |
625 | 612 |
640 | 627 |
641 #define FUNCTION_ARG_SIZE(MODE, TYPE) \ | 628 #define FUNCTION_ARG_SIZE(MODE, TYPE) \ |
642 ((((MODE) != BLKmode \ | 629 ((((MODE) != BLKmode \ |
643 ? (HOST_WIDE_INT) GET_MODE_SIZE (MODE) \ | 630 ? (HOST_WIDE_INT) GET_MODE_SIZE (MODE) \ |
644 : int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) | 631 : int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) |
645 | |
646 /* Update the data in CUM to advance over an argument | |
647 of mode MODE and data type TYPE. | |
648 (TYPE is null for libcalls where that information may not be available.) */ | |
649 | |
650 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ | |
651 { (CUM).nargs_prototype--; \ | |
652 (CUM).words += FUNCTION_ARG_SIZE(MODE, TYPE) \ | |
653 + (((CUM).words & 01) && (TYPE) != 0 \ | |
654 && FUNCTION_ARG_SIZE(MODE, TYPE) > 1); \ | |
655 } | |
656 | 632 |
657 /* Determine where to put an argument to a function. | 633 /* Determine where to put an argument to a function. |
658 Value is zero to push the argument on the stack, | 634 Value is zero to push the argument on the stack, |
659 or a hard register in which to store the argument. | 635 or a hard register in which to store the argument. |
660 | 636 |
714 so that there is only one element. This allows the object to be | 690 so that there is only one element. This allows the object to be |
715 correctly padded. */ | 691 correctly padded. */ |
716 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ | 692 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ |
717 function_arg_padding ((MODE), (TYPE)) | 693 function_arg_padding ((MODE), (TYPE)) |
718 | 694 |
719 /* Do not expect to understand this without reading it several times. I'm | |
720 tempted to try and simply it, but I worry about breaking something. */ | |
721 | |
722 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ | |
723 function_arg (&CUM, MODE, TYPE, NAMED) | |
724 | |
725 /* If defined, a C expression that gives the alignment boundary, in | |
726 bits, of an argument with the specified mode and type. If it is | |
727 not defined, `PARM_BOUNDARY' is used for all arguments. */ | |
728 | |
729 /* Arguments larger than one word are double word aligned. */ | |
730 | |
731 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \ | |
732 (((TYPE) \ | |
733 ? (integer_zerop (TYPE_SIZE (TYPE)) \ | |
734 || !TREE_CONSTANT (TYPE_SIZE (TYPE)) \ | |
735 || int_size_in_bytes (TYPE) <= UNITS_PER_WORD) \ | |
736 : GET_MODE_SIZE(MODE) <= UNITS_PER_WORD) \ | |
737 ? PARM_BOUNDARY : MAX_PARM_BOUNDARY) | |
738 | |
739 | 695 |
740 /* On HPPA, we emit profiling code as rtl via PROFILE_HOOK rather than | 696 /* On HPPA, we emit profiling code as rtl via PROFILE_HOOK rather than |
741 as assembly via FUNCTION_PROFILER. Just output a local label. | 697 as assembly via FUNCTION_PROFILER. Just output a local label. |
742 We can't use the function label because the GAS SOM target can't | 698 We can't use the function label because the GAS SOM target can't |
743 handle the difference of a global symbol and a local symbol. */ | 699 handle the difference of a global symbol and a local symbol. */ |
807 Since they use reg_renumber, they are safe only once reg_renumber | 763 Since they use reg_renumber, they are safe only once reg_renumber |
808 has been allocated, which happens in local-alloc.c. */ | 764 has been allocated, which happens in local-alloc.c. */ |
809 | 765 |
810 #define REGNO_OK_FOR_INDEX_P(X) \ | 766 #define REGNO_OK_FOR_INDEX_P(X) \ |
811 ((X) && ((X) < 32 \ | 767 ((X) && ((X) < 32 \ |
812 || (X >= FIRST_PSEUDO_REGISTER \ | 768 || ((X) == FRAME_POINTER_REGNUM) \ |
769 || ((X) >= FIRST_PSEUDO_REGISTER \ | |
813 && reg_renumber \ | 770 && reg_renumber \ |
814 && (unsigned) reg_renumber[X] < 32))) | 771 && (unsigned) reg_renumber[X] < 32))) |
815 #define REGNO_OK_FOR_BASE_P(X) \ | 772 #define REGNO_OK_FOR_BASE_P(X) \ |
816 ((X) && ((X) < 32 \ | 773 ((X) && ((X) < 32 \ |
817 || (X >= FIRST_PSEUDO_REGISTER \ | 774 || ((X) == FRAME_POINTER_REGNUM) \ |
775 || ((X) >= FIRST_PSEUDO_REGISTER \ | |
818 && reg_renumber \ | 776 && reg_renumber \ |
819 && (unsigned) reg_renumber[X] < 32))) | 777 && (unsigned) reg_renumber[X] < 32))) |
820 #define REGNO_OK_FOR_FP_P(X) \ | 778 #define REGNO_OK_FOR_FP_P(X) \ |
821 (FP_REGNO_P (X) \ | 779 (FP_REGNO_P (X) \ |
822 || (X >= FIRST_PSEUDO_REGISTER \ | 780 || (X >= FIRST_PSEUDO_REGISTER \ |
961 #ifndef REG_OK_STRICT | 919 #ifndef REG_OK_STRICT |
962 | 920 |
963 /* Nonzero if X is a hard reg that can be used as an index | 921 /* Nonzero if X is a hard reg that can be used as an index |
964 or if it is a pseudo reg. */ | 922 or if it is a pseudo reg. */ |
965 #define REG_OK_FOR_INDEX_P(X) \ | 923 #define REG_OK_FOR_INDEX_P(X) \ |
966 (REGNO (X) && (REGNO (X) < 32 || REGNO (X) >= FIRST_PSEUDO_REGISTER)) | 924 (REGNO (X) && (REGNO (X) < 32 \ |
925 || REGNO (X) == FRAME_POINTER_REGNUM \ | |
926 || REGNO (X) >= FIRST_PSEUDO_REGISTER)) | |
967 | 927 |
968 /* Nonzero if X is a hard reg that can be used as a base reg | 928 /* Nonzero if X is a hard reg that can be used as a base reg |
969 or if it is a pseudo reg. */ | 929 or if it is a pseudo reg. */ |
970 #define REG_OK_FOR_BASE_P(X) \ | 930 #define REG_OK_FOR_BASE_P(X) \ |
971 (REGNO (X) && (REGNO (X) < 32 || REGNO (X) >= FIRST_PSEUDO_REGISTER)) | 931 (REGNO (X) && (REGNO (X) < 32 \ |
932 || REGNO (X) == FRAME_POINTER_REGNUM \ | |
933 || REGNO (X) >= FIRST_PSEUDO_REGISTER)) | |
972 | 934 |
973 #else | 935 #else |
974 | 936 |
975 /* Nonzero if X is a hard reg that can be used as an index. */ | 937 /* Nonzero if X is a hard reg that can be used as an index. */ |
976 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) | 938 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) |
1157 && !TARGET_ELF32 \ | 1119 && !TARGET_ELF32 \ |
1158 && GET_CODE (XEXP (X, 1)) != CONST_INT) \ | 1120 && GET_CODE (XEXP (X, 1)) != CONST_INT) \ |
1159 || ((MODE) != SFmode \ | 1121 || ((MODE) != SFmode \ |
1160 && (MODE) != DFmode))) \ | 1122 && (MODE) != DFmode))) \ |
1161 goto ADDR; \ | 1123 goto ADDR; \ |
1162 else if (GET_CODE (X) == LABEL_REF \ | 1124 else if (GET_CODE (X) == CONST_INT && INT_5_BITS (X)) \ |
1163 || (GET_CODE (X) == CONST_INT \ | |
1164 && INT_5_BITS (X))) \ | |
1165 goto ADDR; \ | 1125 goto ADDR; \ |
1166 /* Needed for -fPIC */ \ | 1126 /* Needed for -fPIC */ \ |
1167 else if (GET_CODE (X) == LO_SUM \ | 1127 else if (GET_CODE (X) == LO_SUM \ |
1168 && GET_CODE (XEXP (X, 0)) == REG \ | 1128 && GET_CODE (XEXP (X, 0)) == REG \ |
1169 && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ | 1129 && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ |
1347 | 1307 |
1348 /* Define this to be nonzero if shift instructions ignore all but the low-order | 1308 /* Define this to be nonzero if shift instructions ignore all but the low-order |
1349 few bits. */ | 1309 few bits. */ |
1350 #define SHIFT_COUNT_TRUNCATED 1 | 1310 #define SHIFT_COUNT_TRUNCATED 1 |
1351 | 1311 |
1352 /* Compute extra cost of moving data between one register class | |
1353 and another. | |
1354 | |
1355 Make moves from SAR so expensive they should never happen. We used to | |
1356 have 0xffff here, but that generates overflow in rare cases. | |
1357 | |
1358 Copies involving a FP register and a non-FP register are relatively | |
1359 expensive because they must go through memory. | |
1360 | |
1361 Other copies are reasonably cheap. */ | |
1362 #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \ | |
1363 (CLASS1 == SHIFT_REGS ? 0x100 \ | |
1364 : FP_REG_CLASS_P (CLASS1) && ! FP_REG_CLASS_P (CLASS2) ? 16 \ | |
1365 : FP_REG_CLASS_P (CLASS2) && ! FP_REG_CLASS_P (CLASS1) ? 16 \ | |
1366 : 2) | |
1367 | |
1368 /* Adjust the cost of branches. */ | 1312 /* Adjust the cost of branches. */ |
1369 #define BRANCH_COST(speed_p, predictable_p) (pa_cpu == PROCESSOR_8000 ? 2 : 1) | 1313 #define BRANCH_COST(speed_p, predictable_p) (pa_cpu == PROCESSOR_8000 ? 2 : 1) |
1370 | 1314 |
1371 /* Handling the special cases is going to get too complicated for a macro, | 1315 /* Handling the special cases is going to get too complicated for a macro, |
1372 just call `pa_adjust_insn_length' to do the real work. */ | 1316 just call `pa_adjust_insn_length' to do the real work. */ |
1539 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ | 1483 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ |
1540 pa_asm_output_aligned_local (FILE, NAME, SIZE, ALIGN) | 1484 pa_asm_output_aligned_local (FILE, NAME, SIZE, ALIGN) |
1541 | 1485 |
1542 /* All HP assemblers use "!" to separate logical lines. */ | 1486 /* All HP assemblers use "!" to separate logical lines. */ |
1543 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '!') | 1487 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '!') |
1544 | |
1545 #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ | |
1546 ((CHAR) == '@' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^') | |
1547 | 1488 |
1548 /* Print operand X (an rtx) in assembler syntax to file FILE. | 1489 /* Print operand X (an rtx) in assembler syntax to file FILE. |
1549 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. | 1490 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. |
1550 For `%' followed by punctuation, CODE is the punctuation and X is null. | 1491 For `%' followed by punctuation, CODE is the punctuation and X is null. |
1551 | 1492 |