From: "Robert Richter" <robert.richter@amd.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"LKML" <linux-kernel@vger.kernel.org>
Subject: Re: [patch 1/6] x86: apicdef unification: some constants made unsigned
Date: Mon, 12 Nov 2007 16:56:14 +0100 [thread overview]
Message-ID: <20071112155614.GC18993@erda.amd.com> (raw)
In-Reply-To: <Pine.LNX.4.64N.0711121229360.30102@blysk.ds.pg.gda.pl>
On 12.11.07 12:31:44, Maciej W. Rozycki wrote:
> > -#define GET_APIC_VERSION(x) ((x)&0xFF)
> > -#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF)
> > -#define APIC_INTEGRATED(x) ((x)&0xF0)
> > +#define GET_APIC_VERSION(x) ((x)&0xFFu)
> > +#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFFu)
> > +#define APIC_INTEGRATED(x) ((x)&0xF0u)
>
> No point in doing this -- hexadecimal literals are unsigned by
> definition. File a compiler bug if you see them interpreted otherwise.
My understanding from the c90/c99 standards is that hexadecimal
constants may result in signed or unsigned types. Contrarily, decimal
constants always result in integer types, if no signed suffix is
given.
However, I made this change only to unify 32 and 64 bit implementation
and took already existing code from the 64 bit version.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: robert.richter@amd.com
next prev parent reply other threads:[~2007-11-12 15:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 18:36 [patch 0/6] x86: apicdef.h unification Robert Richter
2007-11-06 18:36 ` [patch 1/6] x86: apicdef unification: some constants made unsigned Robert Richter
2007-11-07 20:41 ` Jeremy Fitzhardinge
2007-11-08 10:14 ` Robert Richter
2007-11-12 12:31 ` Maciej W. Rozycki
2007-11-12 15:56 ` Robert Richter [this message]
2007-11-12 17:58 ` H. Peter Anvin
2007-11-06 18:36 ` [patch 2/6] x86: apicdef unification: minor changes in macro order Robert Richter
2007-11-06 18:36 ` [patch 3/6] x86: apicdef unification: whitespace changes only Robert Richter
2007-11-06 18:36 ` [patch 4/6] x86: apicdef unification: CONFIG_X86_32 checks added Robert Richter
2007-11-06 18:36 ` [patch 5/6] x86: apicdef unification: 32 and 64 bit files coalesced Robert Richter
2007-11-06 18:36 ` [patch 6/6] x86: apicdef unification: more whitespace changes Robert Richter
2007-11-06 20:32 ` [patch 0/6] x86: apicdef.h unification Thomas Gleixner
2007-11-08 10:24 ` Robert Richter
2007-11-08 17:53 ` Thomas Gleixner
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=20071112155614.GC18993@erda.amd.com \
--to=robert.richter@amd.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.