This is the mail archive of the cgen@sourceware.org mailing list for the CGEN 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] Hacky fix for -ve shifts in m32r decode2.c for cgen 1.1


Doug Evans <dje@sebabeach.org> writes:

> [...]
> Btw, has the sid m32r simulator been tested recently?

Not as far as I know.

> It's doing things like:
> m32rbf.cxx:
> 	      else // pair of short instructions
> 		{
> 		  UHI first = insn >> 16;
> 		  sem->decode (this, pc, first, first);
> 		}
> and
> m32r-decode.cxx:
>       unsigned int val = (((insn >> 24) & (15 << 4)) | ((insn >> 20) & (15 << 0)));
>       switch (val)
>       {
>       case 0 :
>         entire_insn = entire_insn >> 16;
>
> Note that
> - insn is being shifted by 16 tis and then by 24 bits,

Dunny, maybe this particular switch does not activate in the first
place for 16-bit short instructions?

> - after entire_insn >>= 16, it's been shifted by 32 bits.

(But is the value used after this point?)

- FChE


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