Changeset 156111 in webkit


Ignore:
Timestamp:
Sep 19, 2013, 1:07:25 PM (12 years ago)
Author:
msaboff@apple.com
Message:

JSC: X86 disassembler shows 16, 32 and 64 bit displacements as unsigned
https://bugs.webkit.org/show_bug.cgi?id=121625

Rubber-stamped by Filip Pizlo.

Chenged 16, 32 and 64 bit offsets to be signed. Kept the original tab indented
spacing to match the rest of the file.

  • disassembler/udis86/udis86_syn-att.c:

(gen_operand):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r156085 r156111  
     12013-09-19  Michael Saboff  <msaboff@apple.com>
     2
     3        JSC: X86 disassembler shows 16, 32 and 64 bit displacements as unsigned
     4        https://bugs.webkit.org/show_bug.cgi?id=121625
     5
     6        Rubber-stamped by Filip Pizlo.
     7
     8        Chenged 16, 32 and 64 bit offsets to be signed.  Kept the original tab indented
     9        spacing to match the rest of the file.
     10
     11        * disassembler/udis86/udis86_syn-att.c:
     12        (gen_operand):
     13
    1142013-09-19  Daniel Bates  <dabates@apple.com>
    215
  • trunk/Source/JavaScriptCore/disassembler/udis86/udis86_syn-att.c

    r138449 r156111  
    6767                        if (op->lval.sbyte < 0)
    6868                                mkasm(u, "-0x%x", (-op->lval.sbyte) & 0xff);
    69                         else    mkasm(u, "0x%x", op->lval.sbyte);
     69                        else
     70                                mkasm(u, "0x%x", op->lval.sbyte);
    7071                }
    71                 else if (op->offset == 16)
    72                         mkasm(u, "0x%x", op->lval.uword);
    73                 else if (op->offset == 32)
    74                         mkasm(u, "0x%lx", (unsigned long)op->lval.udword);
    75                 else if (op->offset == 64)
    76                         mkasm(u, "0x" FMT64 "x", op->lval.uqword);
     72                else if (op->offset == 16) {
     73                        if (op->lval.sword < 0)
     74                                mkasm(u, "-0x%x", (-op->lval.sword) & 0xffff);
     75                        else
     76                                mkasm(u, "0x%x", op->lval.sword);
     77                } else if (op->offset == 32) {
     78                        if (op->lval.sdword < 0)
     79                                mkasm(u, "-0x%x", (-op->lval.sdword) & 0xffffffff);
     80                        else
     81                                mkasm(u, "0x%x", op->lval.sdword);
     82                } else if (op->offset == 64) {
     83                        if (op->lval.sdword < 0)
     84                                mkasm(u, "-0x" FMT64 "x", -op->lval.sqword);
     85                        else
     86                                mkasm(u, "0x" FMT64 "x", op->lval.sqword);
     87                }
    7788
    7889                if (op->base)
Note: See TracChangeset for help on using the changeset viewer.