On Monday 06 July 2009 20:43:41 Øyvind Harboe wrote:
> How about if we changed the way this "mode" is handled to
> get out of the dire straits we're in...
>
> We need a couple of operations at least:
>
> - set known mode (handled today)
> - save & restore mode (can be handled w/unknown mode I think)
I really think there shouldn't be any unknown modes. If there is one, we've
lost already, and should print an error.
The mode affects the processors view of its register file, e.g. system aliases
to user registers, both lack a SPSR. Only r13 and r14 are distinct for most
modes, but FIQ has its own r8 to r12.
> - try to interpret mode to user text (here unknown modes are trivially
> handlled)
>
> Others?
>
>
> I was thinking about replacing the mode enum with a structure:
>
> struct translated_mode
> {
> int saved_mode;
> enum translated_mode mode;
> };
>
> that way we would get type checking too and can more easily
> catch the type bugs I spotted today...
I don't understand what bug you've spotted - mode 19 is supervisor, and is
documented and handled in the code.
Regards,
Dominic
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development