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]
Other format: [Raw text]

Re: dwarf2 patch, fix PR 11983


On Sat, Mar 06, 2004 at 11:58:58PM +1030, Alan Modra wrote:
> +	if (GET_MODE_CLASS (mode) == MODE_VECTOR_INT)
> +	  {
> +	    for (i = 0, p = array; i < length; i++, p += elt_size)
> +	      {
> +		rtx elt = CONST_VECTOR_ELT (rtl, i);
> +		HOST_WIDE_INT lo, hi;
> +		if (GET_CODE (elt) == CONST_INT)
> +		  {
> +		    lo = INTVAL (elt);
> +		    hi = -(lo < 0);
> +		  }
> +		else if (GET_CODE (elt) == CONST_DOUBLE)
> +		  {
> +		    lo = CONST_DOUBLE_LOW (elt);
> +		    hi = CONST_DOUBLE_HIGH (elt);
> +		  }
> +		else
> +		  abort ();
> +
> +		if (elt_size <= sizeof (HOST_WIDE_INT))
> +		  insert_int (lo, elt_size, p);

Gets byte ordering wrong for big-endian.



r~


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