Changeset 3259 in CLRX


Ignore:
Timestamp:
Aug 17, 2017, 1:53:52 PM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Disasm: Add printing code position in comments by default.

Location:
CLRadeonExtender/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/CLRX/amdasm/Disassembler.h

    r3195 r3259  
    5757    DISASM_CONFIG = 128,    ///< print kernel configuration instead raw data
    5858    DISASM_BUGGYFPLIT = 256,
     59    DISASM_CODEPOS = 512,   ///< print code position
    5960   
    6061    ///< all disassembler flags (without config)
  • CLRadeonExtender/trunk/amdasm/GCNDisasm.cpp

    r3250 r3259  
    29042904            buf[bufPos++] = '/';
    29052905            buf[bufPos++] = '*';
     2906            if (disassembler.getFlags() & DISASM_CODEPOS)
     2907            {
     2908                bufPos += itocstrCStyle(oldPos<<2, buf+bufPos, 20, 16, 12, false);
     2909                buf[bufPos++] = ':';
     2910                buf[bufPos++] = ' ';
     2911            }
    29062912            bufPos += itocstrCStyle(insnCode, buf+bufPos, 12, 16, 8, false);
    29072913            buf[bufPos++] = ' ';
     
    29172923        else // add spaces
    29182924        {
    2919             char* buf = output.reserve(8);
    2920             output.forward(addSpacesOld(buf, 8));
     2925            if (disassembler.getFlags() & DISASM_CODEPOS)
     2926            {
     2927                char* buf = output.reserve(30);
     2928                size_t bufPos = 0;
     2929                buf[bufPos++] = '/';
     2930                buf[bufPos++] = '*';
     2931                bufPos += itocstrCStyle(oldPos<<2, buf+bufPos, 20, 16, 12, false);
     2932                buf[bufPos++] = '*';
     2933                buf[bufPos++] = '/';
     2934                buf[bufPos++] = ' ';
     2935                output.forward(bufPos);
     2936            }
     2937            else
     2938            {   // add spaces
     2939                char* buf = output.reserve(8);
     2940                output.forward(addSpacesOld(buf, 8));
     2941            }
    29212942        }
    29222943       
  • CLRadeonExtender/trunk/programs/clrxdisasm.cpp

    r2701 r3259  
    7070    }
    7171   
    72     Flags disasmFlags = DISASM_DUMPCODE;
     72    Flags disasmFlags = DISASM_DUMPCODE|DISASM_CODEPOS;
    7373    if (cli.hasShortOption('a'))
    7474        disasmFlags = DISASM_ALL;
  • CLRadeonExtender/trunk/tests/amdasm/DisasmDataTest.cpp

    r3150 r3259  
    13931393    std::ostringstream disasmOss;
    13941394    std::string resultStr;
    1395     Flags disasmFlags = DISASM_ALL;
     1395    Flags disasmFlags = DISASM_ALL&~DISASM_CODEPOS;
    13961396    if (testCase.config)
    13971397        disasmFlags |= DISASM_CONFIG;
Note: See TracChangeset for help on using the changeset viewer.