This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: double max case labels in switch
On Sun, Nov 25, 2001 at 01:38:06PM +1030, Alan Modra wrote:
> > > This doesn't seem right. This is used by variable length insn
> > > processing, isn't it? Which means that the constants set in
> > > the md file for branch lengths would break.
> > >
> > > Seems better to just fix the backends in question to represent
> > > lengths in bytes.
>
> I'm not quite sure what you're getting at here.
Consider
(if_then_else (eq_attr "type" "branch")
(if_then_else (and (ge (minus (match_dup 0) (pc))
(const_int -32768))
(lt (minus (match_dup 0) (pc))
(const_int 32764)))
(const_int 4)
(const_int 8))
Which units will be used for this calculation? I claim that
"length" should be figured consistently in one set of units
lest we get mightly confused.
r~