On Mon, Oct 25, 2010 at 1:20 AM, Gabe Black <[email protected]> wrote:
>
> Looking through the patch to get an idea of what this might look like, a
> significant flaw is apparent. Most of the instructions that modify the
> PC do that relative to the current PC, and that means reading and then
> writing the PC. writing the PC is a read modify write operation, but
> we've already read the PC earlier. There was no direct mechanism to
> describe an offset in the old syntax, so these have to be read in,
> operated on, and then written out as three different steps. Also some
> operations aren't just displacements, and with delay slots its not
> constant which pc should be displaced when you have annulled delay
> slots. ARM won't cooperate basically at all because you need to
> read/write the thumb mode bit pretty frequently to see how to update the
> PC, and the PC behaves differently depending on the circumstances which
> would need different accessors.
>
> I think we could reclaim a lot of these cases by making the parser
> smarter like I said and making it keep track of whether or not it's read
> in the PCState structure already. Not being able to put a "." after the
> PCS operand is another major inconvenience, but maybe we can work around
> that too because the actual type is fixed and overrides don't make
> sense. These are both doable modifications, but they're both non-trivial
> and I'd rather not hold up this change any longer or complicate it any
> more by implementing them now.

OK, I'll buy that.  Another approach to consider is to implement +=
and -= operators in the ISA parser and use those for PC-relative
updates, but I agree with you that that's a big enough modification
that we can save it for a later patch.

Steve
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to