This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 1/2] PRU Simulator port
- From: Dimitar Dimitrov <dimitar at dinux dot eu>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 14 Feb 2017 23:25:24 +0200
- Subject: Re: [PATCH v2 1/2] PRU Simulator port
- Authentication-results: sourceware.org; auth=none
- References: <20161227212556.4214-1-dimitar@dinux.eu> <20170213053609.GF28432@vapier>
Hi Mike,
Thank you for the review.
On понеделник, 13 февруари 2017 г. 0:36:09 EET Mike Frysinger wrote:
> On 27 Dec 2016 23:25, Dimitar Dimitrov wrote:
> > The corresponding libgloss changes have not yet been mainlined.
> > The PRU patches are available here:
> > https://github.com/dinuxbg/gnupru/tree/for-next/patches/newlib-cygwin
>
> have you sent them to the mailing list ? i don't see them ...
> https://sourceware.org/ml/newlib/
I have not sent the newlib patches yet. My understanding is that I should first
mainline binutils and simulator, then GCC, and finally newlib.
...
> > --- /dev/null
> > +++ b/sim/pru/pru.h
> >
> > +/* (void)0 is a guard against using RD as a left-hand side value. */
> > +#define RD (void)0; rd_is_modified = 1; _RDVAL
>
> the standard way to handle (void)0 is with a do{...}while(0) loop
I'll do it.
>
> looks like you want to make a helper call macro anyways. something like
> #define FOO(x) do { ...; _RDVAL = x; } while (0)
My intention was to keep pru.isa simple and clear, resembling an ISA
specification. Compare
RD = RS1 & OP2
to
STORE_RD (RS1 & OP2)
>
> also, RD depends on _RDVAL which only exists inside a single func.
> this should be moved to interp.c i think for the one user.
I'll do it.
>
Regards,
Dimitar