Commit 99977c61 by Richard Stallman

(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
parent de3ab9df
...@@ -57,7 +57,7 @@ extern int target_flags; ...@@ -57,7 +57,7 @@ extern int target_flags;
/* Generate code that will link against HPUX 8.0 shared libraries. /* Generate code that will link against HPUX 8.0 shared libraries.
Older linkers and assemblers might not support this. */ 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 /* Force all function calls to indirect addressing via a register. This
avoids lossage when the function is very far away from the current PC. 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, ...@@ -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. */ /* 1 if N is a possible register number for function argument passing. */
#define FUNCTION_ARG_REGNO_P(N) (((N) >= 23 && (N) <= 26) || \ #define FUNCTION_ARG_REGNO_P(N) \
((N) >= 32 && (N) <= 35) || \ (((N) >= 23 && (N) <= 26) \
((N) >= 44 && (N) <= 51)) || ((N) >= 32 && (N) <= 35 && ! TARGET_SNAKE) \
|| ((N) >= 44 && (N) <= 51 && TARGET_SNAKE))
/* Define a data type for recording info about an argument list /* Define a data type for recording info about an argument list
during the scan of that argument list. This data type should 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, ...@@ -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 and the rest are pushed. But any arg that won't entirely fit in regs
is pushed. 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)) #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, ...@@ -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))) \ (4 >= ((CUM) + FUNCTION_ARG_SIZE ((MODE), (TYPE))) \
? gen_rtx (REG, (MODE), \ ? gen_rtx (REG, (MODE), \
(FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \ (FUNCTION_ARG_SIZE ((MODE), (TYPE)) > 1 \
? ((MODE) == DFmode \ ? ((! (TARGET_SHARED_LIBS && current_call_is_indirect) \
&& (MODE) == DFmode) \
? ((CUM) ? (TARGET_SNAKE ? 50 : 35) \ ? ((CUM) ? (TARGET_SNAKE ? 50 : 35) \
: (TARGET_SNAKE ? 46 : 33)) \ : (TARGET_SNAKE ? 46 : 33)) \
: ((CUM) ? 23 : 25)) \ : ((CUM) ? 23 : 25)) \
: ((MODE) == SFmode \ : ((! (TARGET_SHARED_LIBS && current_call_is_indirect) \
&& (MODE) == SFmode) \
? (TARGET_SNAKE ? 44 + 2 * (CUM) : 32 + (CUM)) \ ? (TARGET_SNAKE ? 44 + 2 * (CUM) : 32 + (CUM)) \
: (27 - (CUM) - FUNCTION_ARG_SIZE ((MODE), (TYPE))))))\ : (27 - (CUM) - FUNCTION_ARG_SIZE ((MODE), (TYPE))))))\
: 0) : 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment