From: Andrew Volkov <Andrew.Volkov@transas.com>
To: Andrew Cagney <ac131313@cygnus.com>, Kazu Hirata <kazu@cs.umass.edu>
Cc: gdb-patches@sources.redhat.com
Subject: RE: [patch] sim/h8300/compile.c: Fix formatting.
Date: Mon, 20 May 2002 03:22:00 -0000 [thread overview]
Message-ID: <2E74F312D6980D459F3A05492BA40F8DDD7A5E@clue.transas.com> (raw)
Hi
>
>AndrewV,
>
>Don't forget the coding standard:
>
> http://www.gnu.org/prep/standards_toc.html
>
>One thing I noticed is variables like ``_dst''. The leading
>underscore
>shouldn't be used.
>
>enjoy,
>Andrew
>
>
Corrected
Andrey
2002-05-20 Andrey Volkov (avolkov@transas.com)
* compile.c: remove leading undescores in EEPMOV case.
Index: compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.15
diff -u -r1.15 compile.c
--- compile.c 19 May 2002 12:52:54 -0000 1.15
+++ compile.c 20 May 2002 10:12:16 -0000
@@ -1141,25 +1141,25 @@
case O (O_EEPMOV, SW):
if (h8300hmode||h8300smode)
{
- register unsigned char *_src,*_dst;
+ register unsigned char *src,*dst;
unsigned int count = (code->opcode == O(O_EEPMOV,
SW))?cpu.regs[R4_REGNUM]&0xffff:
cpu.regs[R4_REGNUM]&0xff;
- _src = cpu.regs[R5_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R5_REGNUM] :
+ src = cpu.regs[R5_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R5_REGNUM] :
cpu.eightbit + (cpu.regs[R5_REGNUM] & 0xff);
- if ((_src+count)>=(cpu.memory+memory_size))
+ if ((src+count)>=(cpu.memory+memory_size))
{
- if ((_src+count)>=(cpu.eightbit+0x100))
+ if ((src+count)>=(cpu.eightbit+0x100))
goto illegal;
}
- _dst = cpu.regs[R6_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R6_REGNUM] :
+ dst = cpu.regs[R6_REGNUM] < memory_size ?
cpu.memory+cpu.regs[R6_REGNUM] :
cpu.eightbit +
(cpu.regs[R6_REGNUM] & 0xff);
- if ((_dst+count)>=(cpu.memory+memory_size))
+ if ((dst+count)>=(cpu.memory+memory_size))
{
- if ((_dst+count)>=(cpu.eightbit+0x100))
+ if ((dst+count)>=(cpu.eightbit+0x100))
goto illegal;
}
- memcpy(_dst,_src,count);
+ memcpy(dst,src,count);
cpu.regs[R5_REGNUM]+=count;
cpu.regs[R6_REGNUM]+=count;
next reply other threads:[~2002-05-20 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-20 3:22 Andrew Volkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-05-18 4:41 Kazu Hirata
2002-05-18 12:43 ` Andrew Cagney
2002-05-19 4:59 ` Kazu Hirata
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=2E74F312D6980D459F3A05492BA40F8DDD7A5E@clue.transas.com \
--to=andrew.volkov@transas.com \
--cc=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kazu@cs.umass.edu \
/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