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: [vta, vta4.4] handle more RTL codes in dwarf2 location expressions


On Wed, Jun 17, 2009 at 04:44:03AM -0300, Alexandre Oliva wrote:
> Jakub's patch to emit DW_OP_stack_value brought a number of ICEs into
> VTA-enabled builds: we weren't prepared to deal with all the kinds of
> expressions we started getting.
> 
> Furthermore, Jakub's patch enables expressions that operate on integral
> types wider than pointers to get through, even though they will be
> misinterpreted by a Dwarf interpreter, per the existing specs.  I've
> adjusted the patch so that at least top-level expressions wider than the
> specification are caught and dropped.

I think also for the SUBREG case we should check the inner mode's size,
ZERO/SIGN_EXTEND shouldn't result in a wider mode and as the conversion RTLs
from/to floating point etc. are not handled, I hope that should be
everything that might change the mode to a wider one.

> +      /* Conditionals in GCC are supposed to eval to STORE_FLAG_VALUE
> +	 or zero, rather than 1 or 0, so leave these alone for now.  */
> +    case EQ:
> +    case GE:
> +    case GT:
> +    case LE:
> +    case LT:
> +    case NE:
> +    case COMPARE:

That can be handled easily, if STORE_FLAG_VALUE is 1, emit just the
comparison op, if it is something else, use DW_OP_bra.

> +    case IF_THEN_ELSE:
> +    case SMIN:
> +    case SMAX:
> +    case ROTATE:
> +    case ROTATERT:
> +    case TRUNCATE:
> +      /* In theory, we could implement the above.  */
> +      /* DWARF cannot represent the unsigned compare operations
> +	 natively.  */
> +    case GEU:
> +    case GTU:
> +    case LEU:
> +    case LTU:

I believe even the above unsigned ones can be expressed using signed
comparisons.  Well, in theory even floating point addition/multiplication
could be represented, but that would be too long... ;)

> @@ -10677,7 +10782,8 @@ loc_descriptor (rtx rtl, enum machine_mo
>        break;
>  
>      default:
> -      if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode)
> +      if (GET_MODE_CLASS (mode) == MODE_INT && GET_MODE (rtl) == mode
> +	  && GET_MODE_BITSIZE (GET_MODE (rtl)) <= GET_MODE_BITSIZE (Pmode))

Shouldn't this be
&& GET_MODE_SIZE (GET_MODE (rtl)) <= DWARF2_ADDR_SIZE)
instead?  Usually it is the same thing, but might differ on a target or
three.

	Jakub


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