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: [patch] adjust make_range


> Sorry, but you're going to have to dig deeper.

*digs deeper*

OK. I think I found it this time :)

It's late though so I'm going to test this, but I think in this code
here:

if (TREE_CODE_CLASS (code) == '<'
    || TREE_CODE_CLASS (code) == '1'
    || TREE_CODE_CLASS (code) == '2')
  type = TREE_TYPE (arg0);

we actually want the type of the expression (exp) so that we can merge
ranges when we have expressions on the lhs of exp, e.g.

(cond - 2) >= 100

so we'd change that to:

type = TREE_TYPE (exp);

and thus I get the code I really was expecting:

        lbu     $3,%gp_rel(cond)($28)
        li      $2,7                    # 0x7
        addiu   $3,$3,-3
        andi    $3,$3,0x00ff
        sltu    $3,$3,100
        j       $31
        movn    $2,$0,$3

This sound right? a little closer? It's pretty late so I'm running the
whole thing through testing, but I've gone through it a few times and it
seems to make sense - especially now that I understand what's going on
here and how we're merging things around.

-eric

-- 
Eric Christopher <echristo@redhat.com>


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