This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs, mips, difficulty with warning from "movdf_internal1a" ...
- To: egcs at cygnus dot com
- Subject: egcs, mips, difficulty with warning from "movdf_internal1a" ...
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 4 Mar 1998 12:28:00 -0500 (EST)
- Cc: wilson at cygnus dot com
When going through the mips specific warnings, I came across
one that was difficult for me to parse.
> insn-recog.c: In function `recog_5':
> insn-recog.c:3869: warning: suggest parentheses around && within ||
This is the code from insn-recog.c:
> if (TARGET_HARD_FLOAT && (TARGET_FLOAT64 && !TARGET_64BIT)
> && TARGET_DOUBLE_FLOAT
> && (register_operand (operands[0], DFmode)
> || register_operand (operands[1], DFmode))
> || (GET_CODE (operands [0]) == MEM
> && ((GET_CODE (operands[1]) == CONST_INT
> && INTVAL (operands[1]) == 0)
> || operands[1] == CONST0_RTX (DFmode))))
> return 263;
I tracked this down to the following from mips.md:
> (define_insn "movdf_internal1a"
> [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,R,R,To,To,f,*d,*d,*d,*To,*R")
> (match_operand:DF 1 "general_operand" " f,To,f,G,f,G,F,*F,*To,*R,*d,*d"))]
> "TARGET_HARD_FLOAT && (TARGET_FLOAT64 && !TARGET_64BIT)
> && TARGET_DOUBLE_FLOAT
> && (register_operand (operands[0], DFmode)
> || register_operand (operands[1], DFmode))
> || (GET_CODE (operands [0]) == MEM
> && ((GET_CODE (operands[1]) == CONST_INT
> && INTVAL (operands[1]) == 0)
> || operands[1] == CONST0_RTX (DFmode)))"
> "* return mips_move_2words (operands, insn); "
> [(set_attr "type" "move,load,store,store,store,store,load,load,load,load,store,store")
> (set_attr "mode" "DF")
> (set_attr "length" "1,2,1,1,2,2,2,2,2,1,2,1")])
I made a stab at adding parentheses to this and it ended up
causing testsuite regressions, so I backed off. Would someone more
familiar with this code please help out?
Thanks,
--Kaveh
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu ICon CMT Corp.