B.3.2. Details of PFT trace decompression operations

The following subsections describe the PFT trace decompression operations:

branch_no_excp()

The operation of branch_no_excp() is:

  1. Extract branch target details from the branch address packet and LastState and store into CurrentState.

  2. Execute decode_instr(CurrentState).

  3. Output an instruction object including information from CurrentState.

  4. Increment CurrentState.address by decoded instruction size.

  5. If decoded instruction is not a waypoint, go back to stage 2.

  6. If decoded instruction is a waypoint:

    1. Update CurrentState and LastState with branch target address and state.

    2. If return stack is enabled and decoded instruction is a branch with link, push return address, instruction set state and security state onto top of return stack.

  7. Return.

branch_with_excp()

The operation of branch_with_excp() is:

  1. Extract branch target details from the branch address packet and LastState, and exception type from the branch address packet.

  2. Output an exception event object including the exception type.

  3. Update CurrentState and LastState with branch target address and state.

  4. Return.

analyze_atomheader()

The operation of analyze_atomheader() is:

  1. For each atom:

    1. Execute decode_instr(CurrentState).

    2. If decoded instruction is not a waypoint:

      • Output an instruction object including information from CurrentState. In this object, the result of the condition code check is unknown.

      • Increment CurrentState.address by decoded instruction size.

      • Go back to step 1.a.

    3. If decoded instruction is a waypoint:

      • Output an instruction object including information from CurrentState and the atom value.

      • If atom is an E atom:

        • Update CurrentState with decoded instruction target address and state

        • If return stack is enabled and decoded instruction is an indirect branch, pop address, instruction set state and security state off the top of the return stack and update CurrentState with these values.

        • If return stack is enabled and decoded instruction is a branch with link, push return address, instruction set state and security state onto the top of the return stack.

      • If atom is an N atom:

        • Increment CurrentState.address by decoded instruction size.

  2. Return.

analyze_cid()

The operation of analyze_cid() is:

  1. Update LastState and CurrentState with the contents of the Context ID packet.

  2. Return.

analyze_vmid()

The operation of analyze_vmid() is:

  1. Update LastState and CurrentState with the contents of the Virtual Machine ID packet.

  2. Return.

analyze_waypoint_update()

The operation of analyze_waypoint_update() is:

  1. Determine waypoint address from address part of packet and LastState.address.

  2. Execute decode_instr(CurrentState).

  3. Output an instruction object including information from CurrentState. In this object, the result of the condition code check is unknown.

  4. If (CurrentState.address + decoded instruction size) > (waypoint address):

    • Return.

  5. If the decoded instruction is not a waypoint:

    1. Increment CurrentState.address by decoded instruction size.

    2. Go back to Step 2.

  6. Return.

analyze_eret()

The operation of analyze_eret() is:

  1. Output an exception return event object.

  2. Return.

decode_instr()

This routine acquires the instruction opcode for the decompressed instruction address and instruction set. The opcode is then decoded according to the rules of the instruction set to obtain the following attributes:

  • Is the instruction a waypoint instruction?

  • If it is a waypoint instruction, is it:

    • A direct branch instruction?

    • An indirect branch instruction?

  • If it is a waypoint instruction, is it a branch with link instruction?

  • If it is a direct branch, what is the branch target address and instruction set state?

  • What is the size, in bytes, of the instruction? The decompressor uses this value to calculate the next instruction address. It also uses it to calculate the target address of a branch instruction that failed its condition code test, and the return address of a branch with link instruction.

Copyright © 1999-2002, 2004-2008, 2011 ARM. All rights reserved.ARM IHI 0035B
Non-ConfidentialID060811