diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-20 05:11:00 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-20 05:11:00 +0000 |
commit | 99977c6183dddfda94f56de3d32316105bc1e152 (patch) | |
tree | 07c0734c2649bec395f7043bea8153dbf598262f /gcc | |
parent | de3ab9df04cdea6645ab3d36f61087641a993290 (diff) | |
download | gcc-99977c6183dddfda94f56de3d32316105bc1e152.zip gcc-99977c6183dddfda94f56de3d32316105bc1e152.tar.gz gcc-99977c6183dddfda94f56de3d32316105bc1e152.tar.bz2 |
(TARGET_SHARED_LIBS): Define as 1.
(FUNCTION_ARG): If this is a call through a function pointer, then
the caller passes all arguments in general registers.
(FUNCTION_ARG_REGNO_P): Account for registers which may
be unavailable on particular cpu models. Fix indentation.
From-SVN: r4517
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/pa/pa.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 2e2318f..2e286db 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -57,7 +57,7 @@ extern int target_flags; /* Generate code that will link against HPUX 8.0 shared libraries. Older linkers and assemblers might not support this. */ -#define TARGET_SHARED_LIBS (target_flags & 8) +#define TARGET_SHARED_LIBS 1 /* was (target_flags & 8) */ /* Force all function calls to indirect addressing via a register. This avoids lossage when the function is very far away from the current PC. @@ -720,9 +720,10 @@ enum reg_class { NO_REGS, R1_REGS, GENERAL_REGS, FP_REGS, GENERAL_OR_FP_REGS, /* 1 if N is a possible register number for function argument passing. */ -#define FUNCTION_ARG_REGNO_P(N) (((N) >= 23 && (N) <= 26) || \ - ((N) >= 32 && (N) <= 35) || \ - ((N) >= 44 && (N) <= 51)) +#define FUNCTION_ARG_REGNO_P(N) \ + (((N) >= 23 && (N) <= 26) \ + || ((N) >= 32 && (N) <= 35 && ! TARGET_SNAKE) \ + || ((N) >= 44 && (N) <= 51 && TARGET_SNAKE)) /* Define a data type for recording info about an argument list during the scan of that argument list. This data type should @@ -774,7 +775,12 @@ enum reg_class { NO_REGS, R1_REGS, GENERAL_REGS, FP_REGS, GENERAL_OR_FP_REGS, and the rest are pushed. But any arg that won't entirely fit in regs is pushed. - Arguments passed in registers are either 1 or 2 words long. */ + Arguments passed in registers are either 1 or 2 words long. + + The caller must make a distinction between calls to explicitly named + functions and calls through pointers to functions -- the conventions + are different! Calls through pointers to functions only use general + registers for the first four argument words. */ #define FUNCTION_ARG_PADDING(MODE, TYPE) function_arg_padding ((MODE), (TYPE)) @@ -782,11 +788,13 @@ enum reg_class { NO_REGS, R1_REGS, GENERAL_REGS, FP_REGS, GENERAL_OR_FP_REGS, (4 >= ((CUM) + FUNCTION_ARG_SIZE ((MODE), (TYPE))) \ ? gen_rtx (REG, (MODE), \ (FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \ - ? ((MODE) == DFmode \ + ? ((! (TARGET_SHARED_LIBS && current_call_is_indirect) \ + && (MODE) == DFmode) \ ? ((CUM) ? (TARGET_SNAKE ? 50 : 35) \ : (TARGET_SNAKE ? 46 : 33)) \ : ((CUM) ? 23 : 25)) \ - : ((MODE) == SFmode \ + : ((! (TARGET_SHARED_LIBS && current_call_is_indirect) \ + && (MODE) == SFmode) \ ? (TARGET_SNAKE ? 44 + 2 * (CUM) : 32 + (CUM)) \ : (27 - (CUM) - FUNCTION_ARG_SIZE ((MODE), (TYPE))))))\ : 0) |