bootstrap/6172: [fr30-elf] does not build
Nick Clifton
nickc@redhat.com
Thu Nov 21 09:00:00 GMT 2002
Hi Guys,
> insn-output.c: In function `output_9':
> insn-output.c:108: `EQ_EXPR' undeclared (first use in this function)
Fixed by applying the patch below.
Cheers
Nick
2002-11-21 Nick Clifton <nickc@redhat.com>
* config/fr30/fr30.md (movsf_constant_store): Move code to
detect 0.0 into fr30.c.
* config/fr30/fr30-protos.h (fr30_const_double_is_zero):
Prototype.
* config/fr30/fr30.c (fr30_const_double_is_zero): New
function. Return true if the rtx is 0.0.
Index: gcc/config/fr30/fr30.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30.md,v
retrieving revision 1.16
diff -c -3 -p -w -r1.16 fr30.md
*** gcc/config/fr30/fr30.md 19 Sep 2002 13:51:21 -0000 1.16
--- gcc/config/fr30/fr30.md 21 Nov 2002 16:26:53 -0000
***************
*** 571,584 ****
const char * ldi_instr;
const char * tmp_reg;
static char buffer[100];
- REAL_VALUE_TYPE d;
! REAL_VALUE_FROM_CONST_DOUBLE (d, operands[1]);
!
! if (REAL_VALUES_EQUAL (d, dconst0))
! ldi_instr = \"ldi:8\";
! else
! ldi_instr = \"ldi:32\";
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
--- 571,579 ----
const char * ldi_instr;
const char * tmp_reg;
static char buffer[100];
! ldi_instr = fr30_const_double_is_zero (operands[1])
! ? ldi_instr = \"ldi:8\" : \"ldi:32\";
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
Index: gcc/config/fr30/fr30-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30-protos.h,v
retrieving revision 1.4
diff -c -3 -p -w -r1.4 fr30-protos.h
*** gcc/config/fr30/fr30-protos.h 12 May 2000 20:57:57 -0000 1.4
--- gcc/config/fr30/fr30-protos.h 21 Nov 2002 16:26:53 -0000
*************** extern int low_register_operand
*** 39,44 ****
--- 39,45 ----
extern int call_operand PARAMS ((rtx, Mmode));
extern int di_operand PARAMS ((rtx, Mmode));
extern int nonimmediate_di_operand PARAMS ((rtx, Mmode));
+ extern int fr30_const_double_is_zero PARAMS ((rtx));
#undef Mmode
#endif /* HAVE_MACHINE_MODES */
#endif /* RTX_CODE */
Index: gcc/config/fr30/fr30.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/fr30/fr30.c,v
retrieving revision 1.28
diff -c -3 -p -w -r1.28 fr30.c
*** gcc/config/fr30/fr30.c 16 Oct 2002 00:40:29 -0000 1.28
--- gcc/config/fr30/fr30.c 21 Nov 2002 16:26:53 -0000
*************** fr30_check_multiple_regs (operands, num_
*** 951,956 ****
--- 951,970 ----
return 1;
}
+ int
+ fr30_const_double_is_zero (operand)
+ rtx operand;
+ {
+ REAL_VALUE_TYPE d;
+
+ if (operand == NULL || GET_CODE (operand) != CONST_DOUBLE)
+ return 0;
+
+ REAL_VALUE_FROM_CONST_DOUBLE (d, operand);
+
+ return REAL_VALUES_EQUAL (d, dconst0);
+ }
+
/*}}}*/
/*{{{ Instruction Output Routines */
More information about the Gcc-bugs
mailing list