Bug 129192 - A64DOpcodeBitfield::format contains unreachable code
Summary: A64DOpcodeBitfield::format contains unreachable code
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 19:55 PST by Joseph Pecoraro
Modified: 2014-02-21 22:58 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-02-21 19:55:06 PST
There is unreachable code in A64DOpcodeBitfield::format:

    const char* A64DOpcodeBitfield::format()
    {
        ...

        if (opc() == 0x2 && immediateS() == (immediateR() + 1)) {
            // lsl
            ...
            return m_formatBuffer;
        } else if (!(opc() & 0x1) && ((immediateS() & 0x1f) == 0x1f) && (is64Bit() == (immediateS() >> 5))) {
            // asr/lsr
            ...
            return m_formatBuffer;
        } else if (immediateS() < immediateR()) {
            // bit field insert
            ...
            return m_formatBuffer;
        } else {
            // bit field extract
            ...
            return m_formatBuffer;
        }

        appendInstructionName(opName());
        appendRegisterName(rd(), is64Bit());
        appendSeparator();
        appendRegisterName(rn(), is64Bit());
        appendSeparator();
        appendUnsignedImmediate(immediateR());
        appendSeparator();
        appendUnsignedImmediate(immediateS());

        return m_formatBuffer;
    }

Should this code be reachable somehow, or can it just be removed.