Add micromips support to the MIPS simulator
Commit Message
> > No, they are required for some of the macros used in the file so they need
> to
> > stay in.
>
> this needs to be documented as to why. other ports don't need this, and
> it sounds like something wrong with the mips port that should be fixed at
> some point.
The definitions come from the *_support.h files generated by igen and are required
because they are used in some of the macros in the micromipsrun.c file.
Unfortunately we can not just blindly include the *_support.h files to get these
definitions because some of the defines in these files are specific for a particular
configuration of the simulator for example instruction word size is 16 bits for
micromips16 and 32 bits for micromips32. This means we could break future code
changes by doing this, so a safer approach is to just extract the defines that
we need to get the file to compile.
I have added a comment above the defines which explains this. The diff from my
previous patch is below.
Ok to commit?
Many thanks,
Andrew
Comments
On 25 Sep 2015 12:06, Andrew Bennett wrote:
> Ok to commit?
OK, thanks !
-mike
> On 25 Sep 2015 12:06, Andrew Bennett wrote:
>> Ok to commit?
> OK, thanks !
This has now been committed. Once I did the committing I realised that
I only have Binutils write access permissions. Is this ok, or do I need
to get GDB write access as well?
Many thanks,
Andrew
On 25 Sep 2015 20:22, Andrew Bennett wrote:
> > On 25 Sep 2015 12:06, Andrew Bennett wrote:
> >> Ok to commit?
> > OK, thanks !
>
> This has now been committed. Once I did the committing I realised that
> I only have Binutils write access permissions. Is this ok, or do I need
> to get GDB write access as well?
binutils & gdb are the same repo now, and thus there's a single set
of acls controlling `git push`. your patch has been approved, so
that's all you need.
-mike
@@ -26,6 +26,14 @@
#include "bfd.h"
#include "sim-engine.h"
+/* These definitions come from the *_support.h files generated by igen and are
+ required because they are used in some of the macros in the code below.
+ Unfortunately we can not just blindly include the *_support.h files to get
+ these definitions because some of the defines in these files are specific
+ for a particular configuration of the simulator for example instruction word
+ size is 16 bits for micromips16 and 32 bits for micromips32. This means we
+ could break future code changes by doing this, so a safer approach is to just
+ extract the defines that we need to get this file to compile. */
#define SD sd
#define CPU cpu