Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1406800
| From | Philippe De Muyter <phdm@macq.eu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 08/10] m68k: Add <asm/archhash.h> |
| Date | 2016-05-25 12:00 +0200 |
| Message-ID | <rCDLA-7RB-23@gated-at.bofh.it> (permalink) |
| References | <rCCZb-7Br-7@gated-at.bofh.it> <rCD8R-7EH-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, May 25, 2016 at 05:14:35AM -0400, George Spelvin wrote:
>
> I did it the way I did above because it makes the gcc -S output very
> legible. Just like I put a space before the perands on m68k but a tab
> on h8300: that's what GCC does on those platforms.
>
> I started with the "\n\t" suffixes on each line like so much other
> kernel code, but then figured out the format above which is legible
> both in C source and compiler output.
OK thanks.
>
> >> asm("move.l %2,%0;" /* 0x0001 */
> >> "lsl.l #2,%0;" /* 0x0004 */
> >> "move.l %0,%1;"
> >> "lsl.l #7,%0;" /* 0x0200 */
> >> "add.l %2,%0;" /* 0x0201 */
> >> "add.l %0,%1;" /* 0x0205 */
> >> "add.l %0,%0;" /* 0x0402 */
> >> "add.l %0,%1;" /* 0x0607 */
> >> "lsl.l #5,%0" /* 0x8040 */
> >> /* 0x8647 */
>
> > Also, it took me some time to understand the hexadecimal constants
> > in the comments (and the last one predicts a future event :)).
>
>
> Can you recmmend a better way to comment this? My nose is so deep
> in the code it's hard for me to judge.
I second Andreas' suggestion.
Philippe
--
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 08/10] m68k: Add <asm/archhash.h> "George Spelvin" <linux@sciencehorizons.net> - 2016-05-25 09:40 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> Geert Uytterhoeven <geert@linux-m68k.org> - 2016-05-25 10:10 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> "George Spelvin" <linux@sciencehorizons.net> - 2016-05-25 10:30 +0200
Re: [PATCH 08v2/10] m68k: Add <asm/archhash.h> "George Spelvin" <linux@sciencehorizons.net> - 2016-05-25 10:30 +0200
Re: [PATCH 08v2/10] m68k: Add <asm/archhash.h> Geert Uytterhoeven <geert@linux-m68k.org> - 2016-05-25 10:50 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> Philippe De Muyter <phdm@macq.eu> - 2016-05-25 11:10 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> "George Spelvin" <linux@sciencehorizons.net> - 2016-05-25 11:20 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> Andreas Schwab <schwab@linux-m68k.org> - 2016-05-25 11:40 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> Philippe De Muyter <phdm@macq.eu> - 2016-05-25 12:00 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> Philippe De Muyter <phdm@macq.eu> - 2016-05-25 15:30 +0200
Re: [PATCH 08/10] m68k: Add <asm/archhash.h> "George Spelvin" <linux@sciencehorizons.net> - 2016-05-25 15:50 +0200
[PATCH v2 08/10] m68k: Add <asm/hash.h> "George Spelvin" <linux@horizon.com> - 2016-05-27 17:10 +0200
csiph-web