This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 v3 10/14] sim/erc32: Add support for LEON3 processor emulation.


On 01 Mar 2015 22:10, Jiri Gaisler wrote:
> +        if (sregs.psr & 0x080) asi = 11; else asi = 10;

please unwrap all the new if statements

although in cases like this you could just use the tertiary operator:
	asi = (sregs.psr & 0x080) ? 11 : 10;

> +    return(memory_read(addr, data, sz, ws));

return isn't a func, so it shouldn't be written like one:
	return memory_read(...);

applies to multiple places in this patch.

> +static uint32 apbppmem[32*2];    /* 32-entry APB PP AREA */

space around the * op.  applies to multiple places in this patch.

> +static void
> +error_mode(pc)
> +    uint32          pc;
> +{

when writing new functions, avoid old func styles
-mike

Attachment: signature.asc
Description: Digital signature


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