Skip to content

IT blocks can lead to false positives with ETMv4 OCSD_OPFLG_STRICT_N_UNCOND_BR_CHK check #72

@kesyog

Description

@kesyog

With OCSD_OPFLG_STRICT_N_UNCOND_BR_CHK enabled, the ETMv4 decoder checks to see whether N atoms are generated for unconditional branches. However, the m_instr_info.is_conditional checks at https://github.com/Linaro/OpenCSD/blob/master/decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp#L1374 and https://github.com/Linaro/OpenCSD/blob/master/decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp#L1405 only check if the current opcode is conditional; they do not account for non-conditional branch instructions that are made conditional by a preceding IT instruction.

We do parse IT instructions in inst_Thumb_is_IT and make that information available in ocsd_instr_info.thumb_it_conditions, but that information is not used anywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions