qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] arm-dis: Fix spelling in comments (iff -> if)
@ 2012-04-17 17:58 Stefan Weil
  2012-04-17 18:22 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
  2012-04-20 12:20 ` Stefan Hajnoczi
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Weil @ 2012-04-17 17:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Paul Brook

The spelling 'iff' is sometimes used for 'if and only if'.
Even if that meaning could be applied here, it is not used
consistently. It is also quite unusual to use 'if and only if'
in technical documentation. Therefore a simple 'if' should be
preferred here.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 arm-dis.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arm-dis.c b/arm-dis.c
index 6bc4d71..db15eca 100644
--- a/arm-dis.c
+++ b/arm-dis.c
@@ -130,8 +130,8 @@ struct opcode16
    %z<code>		print a double precision VFP reg
 			  Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
 
-   %<bitfield>'c	print specified char iff bitfield is all ones
-   %<bitfield>`c	print specified char iff bitfield is all zeroes
+   %<bitfield>'c	print specified char if bitfield is all ones
+   %<bitfield>`c	print specified char if bitfield is all zeroes
    %<bitfield>?ab...    select from array of values in big endian order
 
    %L			print as an iWMMXt N/M width field.
@@ -522,8 +522,8 @@ static const struct opcode32 coprocessor_opcodes[] =
    %<bitfield>Tn	print short scaled width limited by n
    %<bitfield>Un	print long scaled width limited by n
 
-   %<bitfield>'c	print specified char iff bitfield is all ones
-   %<bitfield>`c	print specified char iff bitfield is all zeroes
+   %<bitfield>'c	print specified char if bitfield is all ones
+   %<bitfield>`c	print specified char if bitfield is all zeroes
    %<bitfield>?ab...    select from array of values in big endian order  */
 
 static const struct opcode32 neon_opcodes[] =
@@ -787,8 +787,8 @@ static const struct opcode32 neon_opcodes[] =
    %c			print condition code (always bits 28-31)
    %m			print register mask for ldm/stm instruction
    %o			print operand2 (immediate or register + shift)
-   %p			print 'p' iff bits 12-15 are 15
-   %t			print 't' iff bit 21 set and bit 24 clear
+   %p			print 'p' if bits 12-15 are 15
+   %t			print 't' if bit 21 set and bit 24 clear
    %B			print arm BLX(1) destination
    %C			print the PSR sub type.
    %U			print barrier type.
@@ -800,8 +800,8 @@ static const struct opcode32 neon_opcodes[] =
    %<bitfield>x		print the bitfield in hex
    %<bitfield>X		print the bitfield as 1 hex digit without leading "0x"
 
-   %<bitfield>'c	print specified char iff bitfield is all ones
-   %<bitfield>`c	print specified char iff bitfield is all zeroes
+   %<bitfield>'c	print specified char if bitfield is all ones
+   %<bitfield>`c	print specified char if bitfield is all zeroes
    %<bitfield>?ab...    select from array of values in big endian order
 
    %e                   print arm SMI operand (bits 0..7,8..19).
@@ -1090,7 +1090,7 @@ static const struct opcode32 arm_opcodes[] =
    %<bitfield>a         print (bitfield * 4) as a pc-rel offset + decoded symbol
    %<bitfield>B         print Thumb branch destination (signed displacement)
    %<bitfield>c         print bitfield as a condition code
-   %<bitnum>'c		print specified char iff bit is one
+   %<bitnum>'c		print specified char if bit is one
    %<bitnum>?ab		print a if bit is one else print b.  */
 
 static const struct opcode16 thumb_opcodes[] =
@@ -1248,8 +1248,8 @@ static const struct opcode16 thumb_opcodes[] =
        %<bitfield>r	print bitfield as an ARM register
        %<bitfield>c	print bitfield as a condition code
 
-       %<bitfield>'c	print specified char iff bitfield is all ones
-       %<bitfield>`c	print specified char iff bitfield is all zeroes
+       %<bitfield>'c	print specified char if bitfield is all ones
+       %<bitfield>`c	print specified char if bitfield is all zeroes
        %<bitfield>?ab... select from array of values in big endian order
 
    With one exception at the bottom (done because BL and BLX(1) need
-- 
1.7.9



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] arm-dis: Fix spelling in comments (iff -> if)
  2012-04-17 17:58 [Qemu-trivial] [PATCH] arm-dis: Fix spelling in comments (iff -> if) Stefan Weil
@ 2012-04-17 18:22 ` Andreas Färber
  2012-04-17 19:15   ` Peter Maydell
  2012-04-20 12:20 ` Stefan Hajnoczi
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2012-04-17 18:22 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, Peter Maydell, qemu-devel, Paul Brook

Am 17.04.2012 19:58, schrieb Stefan Weil:
> The spelling 'iff' is sometimes used for 'if and only if'.
> Even if that meaning could be applied here, it is not used
> consistently. It is also quite unusual to use 'if and only if'
> in technical documentation. Therefore a simple 'if' should be
> preferred here.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  arm-dis.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)

Aren't the *-dis.c files imported from binutils? In that case I'd
suggest to stay in sync with how they write/wrote it.
(Would spelling fixes in comments be subject to the GPLv3?)

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] arm-dis: Fix spelling in comments (iff -> if)
  2012-04-17 18:22 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
@ 2012-04-17 19:15   ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-04-17 19:15 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-trivial, Stefan Weil, qemu-devel, Paul Brook

On 17 April 2012 19:22, Andreas Färber <afaerber@suse.de> wrote:
> Am 17.04.2012 19:58, schrieb Stefan Weil:
>> The spelling 'iff' is sometimes used for 'if and only if'.
>> Even if that meaning could be applied here, it is not used
>> consistently. It is also quite unusual to use 'if and only if'
>> in technical documentation. Therefore a simple 'if' should be
>> preferred here.
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>>  arm-dis.c |   22 +++++++++++-----------
>>  1 files changed, 11 insertions(+), 11 deletions(-)
>
> Aren't the *-dis.c files imported from binutils? In that case I'd
> suggest to stay in sync with how they write/wrote it.

Yes, arm-dis.c is from binutils. These comments still read 'iff'
in current binutils, as they have done since first introduced
in binutils 2.5 in 1994.

-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] arm-dis: Fix spelling in comments (iff -> if)
  2012-04-17 17:58 [Qemu-trivial] [PATCH] arm-dis: Fix spelling in comments (iff -> if) Stefan Weil
  2012-04-17 18:22 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
@ 2012-04-20 12:20 ` Stefan Hajnoczi
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-04-20 12:20 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel, Paul Brook

On Tue, Apr 17, 2012 at 07:58:13PM +0200, Stefan Weil wrote:
> The spelling 'iff' is sometimes used for 'if and only if'.
> Even if that meaning could be applied here, it is not used
> consistently. It is also quite unusual to use 'if and only if'
> in technical documentation. Therefore a simple 'if' should be
> preferred here.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  arm-dis.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)

Given the discussion about the origin of this code I think it makes
sense to leave the 'iff' to reduce spurious differences.

I am not taking this patch for now.  Feel free to discuss more if you do
think it should go in.

Stefan


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-20 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17 17:58 [Qemu-trivial] [PATCH] arm-dis: Fix spelling in comments (iff -> if) Stefan Weil
2012-04-17 18:22 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
2012-04-17 19:15   ` Peter Maydell
2012-04-20 12:20 ` Stefan Hajnoczi

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).