This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Alpha bootstrap error in bitmap.c
- To: lucier at math dot purdue dot edu
- Subject: Re: Alpha bootstrap error in bitmap.c
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 16 Oct 2001 15:46:10 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <200110131848.f9DImZ215979@banach.math.purdue.edu>
On Sat, Oct 13, 2001 at 01:48:35PM -0500, lucier@math.purdue.edu wrote:
> make bootstrap BOOT_CFLAGS='-O2 -g -pg' BOOT_LDFLAGS='-O2 -g -pg'
[...]
> ../../gcc/bitmap.c:368: Unrecognizable insn:
> (call_insn/j 204 203 205 (parallel[
> (call (mem:DI (symbol_ref/v:DI ("bitmap_element_link")) 0)
Fixed thus.
r~
* alpha.c (current_file_function_operand): Don't fail for profiling.
(direct_call_operand): New.
* alpha-protos.h: Declare it.
* alpha.h (EXTRA_CONSTRAINT): Use it.
(PREDICATE_CODES): Add it.
(ASM_OUTPUT_MI_THUNK): Remove.
* alpha32.h (ASM_OUTPUT_MI_THUNK): Remove.
* alpha.md (sibcall_osf_1, sibcall_value_osf_1): Add 's' alternative.
Index: alpha-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha-protos.h,v
retrieving revision 1.26
diff -c -p -d -r1.26 alpha-protos.h
*** alpha-protos.h 2001/09/19 18:55:22 1.26
--- alpha-protos.h 2001/10/16 22:41:19
*************** extern int some_operand PARAMS ((rtx, en
*** 56,61 ****
--- 56,62 ----
extern int some_ni_operand PARAMS ((rtx, enum machine_mode));
extern int input_operand PARAMS ((rtx, enum machine_mode));
extern int current_file_function_operand PARAMS ((rtx, enum machine_mode));
+ extern int direct_call_operand PARAMS ((rtx, enum machine_mode));
extern int local_symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int small_symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int global_symbolic_operand PARAMS ((rtx, enum machine_mode));
Index: alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.196
diff -c -p -d -r1.196 alpha.c
*** alpha.c 2001/10/07 16:51:08 1.196
--- alpha.c 2001/10/16 22:41:20
*************** current_file_function_operand (op, mode)
*** 839,848 ****
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
! return (GET_CODE (op) == SYMBOL_REF
! && ! profile_flag && ! profile_block_flag
! && (SYMBOL_REF_FLAG (op)
! || op == XEXP (DECL_RTL (current_function_decl), 0)));
}
/* Return true if OP is a LABEL_REF, or SYMBOL_REF or CONST referencing
--- 839,873 ----
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{
! if (GET_CODE (op) != SYMBOL_REF)
! return 0;
!
! if (! SYMBOL_REF_FLAG (op)
! && op != XEXP (DECL_RTL (current_function_decl), 0))
! return 0;
!
! return 1;
! }
!
! /* Return 1 if OP is a SYMBOL_REF for which we can make a call via bsr. */
!
! int
! direct_call_operand (op, mode)
! rtx op;
! enum machine_mode mode;
! {
! /* Must be defined in this file. */
! if (! current_file_function_operand (op, mode))
! return 0;
!
! /* If profiling is implemented via linker tricks, we can't jump
! to the nogp alternate entry point. */
! /* ??? TARGET_PROFILING_NEEDS_GP isn't really the right test,
! but is approximately correct for the OSF ABIs. Don't know
! what to do for VMS, NT, or UMK. */
! if (! TARGET_PROFILING_NEEDS_GP
! && ! profile_flag && ! profile_block_flag)
! return 0;
}
/* Return true if OP is a LABEL_REF, or SYMBOL_REF or CONST referencing
Index: alpha.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
retrieving revision 1.136
diff -c -p -d -r1.136 alpha.h
*** alpha.h 2001/09/22 13:27:33 1.136
--- alpha.h 2001/10/16 22:41:20
*************** enum reg_class { NO_REGS, PV_REG, GENERA
*** 824,830 ****
#define EXTRA_CONSTRAINT(OP, C) \
((C) == 'Q' ? normal_memory_operand (OP, VOIDmode) \
! : (C) == 'R' ? current_file_function_operand (OP, Pmode) \
: (C) == 'S' ? (GET_CODE (OP) == CONST_INT \
&& (unsigned HOST_WIDE_INT) INTVAL (OP) < 64) \
: (C) == 'T' ? GET_CODE (OP) == HIGH \
--- 824,830 ----
#define EXTRA_CONSTRAINT(OP, C) \
((C) == 'Q' ? normal_memory_operand (OP, VOIDmode) \
! : (C) == 'R' ? direct_call_operand (OP, Pmode) \
: (C) == 'S' ? (GET_CODE (OP) == CONST_INT \
&& (unsigned HOST_WIDE_INT) INTVAL (OP) < 64) \
: (C) == 'T' ? GET_CODE (OP) == HIGH \
*************** do { \
*** 2093,2136 ****
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
-
- /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
- Used for C++ multiple inheritance. */
- /* ??? This is only used with the v2 ABI, and alpha.c makes assumptions
- about current_function_is_thunk that are not valid with the v3 ABI. */
- #if 0
- #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
- do { \
- const char *fn_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \
- int reg; \
- \
- if (TARGET_ABI_OSF) \
- fprintf (FILE, "\tldgp $29,0($27)\n"); \
- \
- /* Mark end of prologue. */ \
- output_end_prologue (FILE); \
- \
- /* Rely on the assembler to macro expand a large delta. */ \
- fprintf (FILE, "\t.set at\n"); \
- reg = aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION))) ? 17 : 16; \
- fprintf (FILE, "\tlda $%d,%ld($%d)\n", reg, (long)(DELTA), reg); \
- \
- if (current_file_function_operand (XEXP (DECL_RTL (FUNCTION), 0), \
- VOIDmode)) \
- { \
- fprintf (FILE, "\tbr $31,$"); \
- assemble_name (FILE, fn_name); \
- fprintf (FILE, "..ng\n"); \
- } \
- else \
- { \
- fprintf (FILE, "\tjmp $31,"); \
- assemble_name (FILE, fn_name); \
- fputc ('\n', FILE); \
- } \
- fprintf (FILE, "\t.set noat\n"); \
- } while (0)
- #endif
/* Print operand X (an rtx) in assembler syntax to file FILE.
--- 2093,2098 ----
*************** do { \
*** 2188,2193 ****
--- 2150,2156 ----
{"divmod_operator", {DIV, MOD, UDIV, UMOD}}, \
{"fp0_operand", {CONST_DOUBLE}}, \
{"current_file_function_operand", {SYMBOL_REF}}, \
+ {"direct_call_operand", {SYMBOL_REF}}, \
{"local_symbolic_operand", {SYMBOL_REF, CONST, LABEL_REF}}, \
{"small_symbolic_operand", {SYMBOL_REF, CONST}}, \
{"global_symbolic_operand", {SYMBOL_REF, CONST}}, \
Index: alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.153
diff -c -p -d -r1.153 alpha.md
*** alpha.md 2001/09/19 18:55:22 1.153
--- alpha.md 2001/10/16 22:41:20
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 4848,4860 ****
[(set_attr "type" "jsr")
(set_attr "length" "12,*,16")])
(define_insn "*sibcall_osf_1"
! [(call (mem:DI (match_operand:DI 0 "current_file_function_operand" "R"))
(match_operand 1 "" ""))
(use (reg:DI 29))]
"TARGET_ABI_OSF"
! "br $31,$%0..ng"
! [(set_attr "type" "jsr")])
(define_insn "*call_nt_1"
[(call (mem:DI (match_operand:DI 0 "call_operand" "r,R,s"))
--- 4848,4865 ----
[(set_attr "type" "jsr")
(set_attr "length" "12,*,16")])
+ ;; Need 's' alternative for OSF/1, which implements profiling
+ ;; via linker tricks.
(define_insn "*sibcall_osf_1"
! [(call (mem:DI (match_operand:DI 0 "current_file_function_operand" "R,s"))
(match_operand 1 "" ""))
(use (reg:DI 29))]
"TARGET_ABI_OSF"
! "@
! br $31,$%0..ng
! jmp $31,%0"
! [(set_attr "type" "jsr")
! (set_attr "length" "*,8")])
(define_insn "*call_nt_1"
[(call (mem:DI (match_operand:DI 0 "call_operand" "r,R,s"))
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 6802,6815 ****
[(set_attr "type" "jsr")
(set_attr "length" "12,*,16")])
(define_insn "*sibcall_value_osf_1"
[(set (match_operand 0 "" "")
! (call (mem:DI (match_operand:DI 1 "current_file_function_operand" "R"))
(match_operand 2 "" "")))
(use (reg:DI 29))]
"TARGET_ABI_OSF"
! "br $31,$%1..ng"
! [(set_attr "type" "jsr")])
(define_insn "*call_value_nt_1"
[(set (match_operand 0 "" "")
--- 6807,6825 ----
[(set_attr "type" "jsr")
(set_attr "length" "12,*,16")])
+ ;; Need 's' alternative for OSF/1, which implements profiling
+ ;; via linker tricks.
(define_insn "*sibcall_value_osf_1"
[(set (match_operand 0 "" "")
! (call (mem:DI (match_operand:DI 1 "current_file_function_operand" "R,s"))
(match_operand 2 "" "")))
(use (reg:DI 29))]
"TARGET_ABI_OSF"
! "@
! br $31,$%1..ng
! jmp $31,%1"
! [(set_attr "type" "jsr")
! (set_attr "length" "*,8")])
(define_insn "*call_value_nt_1"
[(set (match_operand 0 "" "")
Index: alpha32.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha32.h,v
retrieving revision 1.5
diff -c -p -d -r1.5 alpha32.h
*** alpha32.h 2001/07/15 07:17:29 1.5
--- alpha32.h 2001/10/16 22:41:20
*************** Boston, MA 02111-1307, USA. */
*** 78,107 ****
#undef INITIALIZE_TRAMPOLINE
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 20, 16, 12)
-
- /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
- Used for C++ multiple inheritance. */
- /* ??? This is only used with the v2 ABI, and alpha.c makes assumptions
- about current_function_is_thunk that are not valid with the v3 ABI. */
- #if 0
- #undef ASM_OUTPUT_MI_THUNK
- #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
- do { \
- const char *op, *fn_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \
- int reg; \
- \
- /* Mark end of prologue. */ \
- output_end_prologue (FILE); \
- \
- /* Rely on the assembler to macro expand a large delta. */ \
- reg = aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION))) ? 17 : 16; \
- fprintf (FILE, "\tlda $%d,%ld($%d)\n", reg, (long)(DELTA), reg); \
- \
- op = "jsr"; \
- if (current_file_function_operand (XEXP (DECL_RTL (FUNCTION), 0))) \
- op = "br"; \
- fprintf (FILE, "\t%s $31,", op); \
- assemble_name (FILE, fn_name); \
- fputc ('\n', FILE); \
- } while (0)
- #endif
--- 78,80 ----