It's annoying that -Wparentheses doesn't catch these.

On Mon, Jul 27, 2009 at 8:35 PM, Kasper Lund <[email protected]> wrote:

> LGTM.
>
> On Mon, Jul 27, 2009 at 8:26 PM, <[email protected]> wrote:
> >
> > Reviewers: Kevin Millikin, iposva,
> >
> > Message:
> > Simple parenthesis error.  Anybody want to approve it?
> >
> > Description:
> > X64: Add parentheses to buggy expression in disassembler.
> >
> > Please review this at http://codereview.chromium.org/160174
> >
> > SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
> >
> > Affected files:
> >   M     src/x64/disasm-x64.cc
> >
> >
> > Index: src/x64/disasm-x64.cc
> > ===================================================================
> > --- src/x64/disasm-x64.cc       (revision 2543)
> > +++ src/x64/disasm-x64.cc       (working copy)
> > @@ -1350,7 +1350,7 @@
> >              const char* memory_location = NameOfAddress(
> >                  reinterpret_cast<byte*>(
> >                      *reinterpret_cast<int32_t*>(data + 1)));
> > -            if (*data & 0x2 == 0x2) {  // Opcode 0xA3
> > +            if ((*data & 0x2) == 0x2) {  // Opcode 0xA3
> >                AppendToBuffer("movzxlq rax,(%s)", memory_location);
> >              } else {  // Opcode 0xA1
> >                AppendToBuffer("movzxlq (%s),rax", memory_location);
> > @@ -1362,7 +1362,7 @@
> >              // New x64 instruction mov rax,(imm_64).
> >              const char* memory_location = NameOfAddress(
> >                  *reinterpret_cast<byte**>(data + 1));
> > -            if (*data & 0x2 == 0x2) {  // Opcode 0xA3
> > +            if ((*data & 0x2) == 0x2) {  // Opcode 0xA3
> >                AppendToBuffer("movq rax,(%s)", memory_location);
> >              } else {  // Opcode 0xA1
> >                AppendToBuffer("movq (%s),rax", memory_location);
> >
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to