This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: i386 cleanup and fix


On Thu, Jan 11, 2001 at 10:50:41AM +0100, Jan Hubicka wrote:
> 	* i386.c (ix86_expand_fp_compare): Fix ordered/unordered confussion.

Ok.


There's nothing wrong with the code as written, but I do wonder if

> + 	case LT:
> + 	case UNLT:
> + 	  if (code == LT && TARGET_IEEE_FP)
> + 	    {
> + 	      emit_insn (gen_andqi_ext_0 (scratch, scratch, GEN_INT (0x45)));
>   	      emit_insn (gen_cmpqi_ext_3 (scratch, GEN_INT (0x01)));
>   	      intcmp_mode = CCmode;
>   	      code = EQ;
> ! 	    }
> ! 	  else
> ! 	    {
> ! 	      emit_insn (gen_testqi_ext_ccno_0 (scratch, GEN_INT (0x01)));
> ! 	      code = NE;
> ! 	    }
> ! 	  break;

is better written as

	case LT:
	  if (TARGET_IEEE_FP)
	    {
 	      emit_insn (gen_andqi_ext_0 (scratch, scratch, GEN_INT (0x45)));
 	      emit_insn (gen_cmpqi_ext_3 (scratch, GEN_INT (0x01)));
 	      intcmp_mode = CCmode;
 	      code = EQ;
	      break;
	    }
	  /* FALLTHRU */
	case UNLT:
	  emit_insn (gen_testqi_ext_ccno_0 (scratch, GEN_INT (0x01)));
	  code = NE;
	  break;

I guess this is simply a matter of taste.


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]