qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Aleksandar Markovic <aleksandar.m.mail@gmail.com>,
	Michael Rolnik <mrolnik@gmail.com>
Cc: "thuth@redhat.com" <thuth@redhat.com>,
	Sarah Harris <S.E.Harris@kent.ac.uk>,
	"me@xcancerberox.com.ar" <me@xcancerberox.com.ar>,
	"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"dovgaluk@ispras.ru" <dovgaluk@ispras.ru>,
	"imammedo@redhat.com" <imammedo@redhat.com>
Subject: Re: [PATCH v39 01/22] target/avr: Add outward facing interfaces and core CPU logic
Date: Sat, 21 Dec 2019 12:22:55 +0100	[thread overview]
Message-ID: <5e6bb53e-97ac-c630-c6c3-82cbd9657a79@redhat.com> (raw)
In-Reply-To: <CAL1e-=ikJOrT+ZCA+jjN0mj08uoeY7RpFqti=qE4RU+R+ikd2g@mail.gmail.com>

Hi Aleksandar,

On 12/21/19 11:53 AM, Aleksandar Markovic wrote:
> 
> 
> On Wednesday, December 18, 2019, Michael Rolnik <mrolnik@gmail.com 
> <mailto:mrolnik@gmail.com>> wrote:
> 
>     This includes:
>     - CPU data structures
>     - object model classes and functions
>     - migration functions
>     - GDB hooks
> 
>     Co-developed-by: Michael Rolnik <mrolnik@gmail.com
>     <mailto:mrolnik@gmail.com>>
>     Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk
>     <mailto:S.E.Harris@kent.ac.uk>>
>     Signed-off-by: Michael Rolnik <mrolnik@gmail.com
>     <mailto:mrolnik@gmail.com>>
>     Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk
>     <mailto:S.E.Harris@kent.ac.uk>>
>     Signed-off-by: Michael Rolnik <mrolnik@gmail.com
>     <mailto:mrolnik@gmail.com>>
>     Acked-by: Igor Mammedov <imammedo@redhat.com
>     <mailto:imammedo@redhat.com>>
>     Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com
>     <mailto:philmd@redhat.com>>
>     ---
>       target/avr/cpu-param.h |  37 +++
>       target/avr/cpu-qom.h   |  54 ++++
>       target/avr/cpu.h       | 258 ++++++++++++++++
>       target/avr/cpu.c       | 654 +++++++++++++++++++++++++++++++++++++++++
>       target/avr/gdbstub.c   |  84 ++++++
>       target/avr/machine.c   | 121 ++++++++
>       gdb-xml/avr-cpu.xml    |  49 +++
>       7 files changed, 1257 insertions(+)
>       create mode 100644 target/avr/cpu-param.h
>       create mode 100644 target/avr/cpu-qom.h
>       create mode 100644 target/avr/cpu.h
>       create mode 100644 target/avr/cpu.c
>       create mode 100644 target/avr/gdbstub.c
>       create mode 100644 target/avr/machine.c
>       create mode 100644 gdb-xml/avr-cpu.xml
> 
[...]
>     +typedef enum AVRFeature {
>     +    AVR_FEATURE_SRAM,
>     +
>     +    AVR_FEATURE_1_BYTE_PC,
>     +    AVR_FEATURE_2_BYTE_PC,
>     +    AVR_FEATURE_3_BYTE_PC,
>     +
>     +    AVR_FEATURE_1_BYTE_SP,
>     +    AVR_FEATURE_2_BYTE_SP,
>     +
>     +    AVR_FEATURE_BREAK,
>     +    AVR_FEATURE_DES,
>     +    AVR_FEATURE_RMW, /* Read Modify Write - XCH LAC LAS LAT */
>     +
>     +    AVR_FEATURE_EIJMP_EICALL,
>     +    AVR_FEATURE_IJMP_ICALL,
>     +    AVR_FEATURE_JMP_CALL,
>     +
>     +    AVR_FEATURE_ADIW_SBIW,
>     +
>     +    AVR_FEATURE_SPM,
>     +    AVR_FEATURE_SPMX,
>     +
>     +    AVR_FEATURE_ELPMX,
>     +    AVR_FEATURE_ELPM,
>     +    AVR_FEATURE_LPMX,
>     +    AVR_FEATURE_LPM,
>     +
>     +    AVR_FEATURE_MOVW,
>     +    AVR_FEATURE_MUL,
>     +    AVR_FEATURE_RAMPD,
>     +    AVR_FEATURE_RAMPX,
>     +    AVR_FEATURE_RAMPY,
>     +    AVR_FEATURE_RAMPZ,
>     +} AVRFeature;
>     +
> 
> 
> Very good! Now, each feature should have some really brief (less than 
> say 45 characters) comment in the same line as the definition, like this 
> one:
> 
>          AVR_FEATURE_MOVW,      /* supports MOVW instruction */

IMHO this looks overkill when the name is already obvious. In some cases 
we can explicit, such 'RMW'.

Maybe we can simply group the features by type with a single comment 
previous the group, such:

           /* Instructions */
           AVR_FEATURE_MOVW,
           AVR_FEATURE_MUL,
           AVR_FEATURE_RMW, /* Read Modify Write - XCH LAC LAS LAT */
           ...

> 
> You already did it for AVR_FEATURE_RMW
> 
> Of course, all such comments should be vertically aligned nicely.



  reply	other threads:[~2019-12-21 11:23 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 21:03 [PATCH v39 00/22] QEMU AVR 8 bit cores Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 01/22] target/avr: Add outward facing interfaces and core CPU logic Michael Rolnik
2019-12-21 10:53   ` Aleksandar Markovic
2019-12-21 11:22     ` Philippe Mathieu-Daudé [this message]
2019-12-21 12:32   ` Aleksandar Markovic
2019-12-18 21:03 ` [PATCH v39 02/22] target/avr: Add instruction helpers Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 03/22] target/avr: Add instruction decoding Michael Rolnik
2019-12-21 11:18   ` Aleksandar Markovic
2019-12-21 15:57     ` Michael Rolnik
2019-12-21 16:21       ` Aleksandar Markovic
2019-12-21 17:15         ` Aleksandar Markovic
2019-12-28 19:31           ` Michael Rolnik
2019-12-29 14:37             ` Aleksandar Markovic
2019-12-18 21:03 ` [PATCH v39 04/22] target/avr: Add instruction translation - Registers definition Michael Rolnik
2019-12-22 15:54   ` Aleksandar Markovic
2019-12-18 21:03 ` [PATCH v39 05/22] target/avr: Add instruction translation - Arithmetic and Logic Instructions Michael Rolnik
2019-12-22 15:41   ` Aleksandar Markovic
2019-12-18 21:03 ` [PATCH v39 06/22] target/avr: Add instruction translation - Branch Instructions Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 07/22] target/avr: Add instruction translation - Data Transfer Instructions Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 08/22] target/avr: Add instruction translation - Bit and Bit-test Instructions Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 09/22] target/avr: Add instruction translation - MCU Control Instructions Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 10/22] target/avr: Add instruction translation - CPU main translation function Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 11/22] target/avr: Add instruction disassembly function Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 12/22] target/avr: Add limited support for USART peripheral Michael Rolnik
2019-12-20 15:56   ` Philippe Mathieu-Daudé
2019-12-18 21:03 ` [PATCH v39 13/22] target/avr: Add limited support for 16 bit timer peripheral Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 14/22] target/avr: Add dummy mask device Michael Rolnik
2019-12-23  8:46   ` Aleksandar Markovic
2019-12-28 18:52     ` Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 15/22] target/avr: Add example board configuration Michael Rolnik
2019-12-20  9:51   ` Igor Mammedov
2019-12-20 12:30     ` Michael Rolnik
2019-12-20 15:18       ` Igor Mammedov
2019-12-20 23:12   ` Philippe Mathieu-Daudé
2020-01-21 21:32   ` Philippe Mathieu-Daudé
2019-12-18 21:03 ` [PATCH v39 16/22] target/avr: Add section about AVR into QEMU documentation Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 17/22] target/avr: Register AVR support with the rest of QEMU Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 18/22] target/avr: Add machine none test Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 19/22] target/avr: Update build system Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 20/22] target/avr: Add boot serial test Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 21/22] target/avr: Add Avocado test Michael Rolnik
2019-12-18 21:03 ` [PATCH v39 22/22] target/avr: Update MAINTAINERS file Michael Rolnik
2019-12-23  8:56   ` Aleksandar Markovic
2019-12-23  9:13 ` [PATCH v39 00/22] QEMU AVR 8 bit cores Aleksandar Markovic
2019-12-28 18:01   ` Michael Rolnik
2019-12-28 19:38     ` Aleksandar Markovic
2019-12-28 20:00       ` Michael Rolnik
2019-12-29 14:19         ` Aleksandar Markovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e6bb53e-97ac-c630-c6c3-82cbd9657a79@redhat.com \
    --to=philmd@redhat.com \
    --cc=S.E.Harris@kent.ac.uk \
    --cc=aleksandar.m.mail@gmail.com \
    --cc=dovgaluk@ispras.ru \
    --cc=imammedo@redhat.com \
    --cc=me@xcancerberox.com.ar \
    --cc=mrolnik@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).