This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help about opcode

hello
i have an opcode of BNE branch which is 1AFFFFF9 and i want to know to which address go this branch i mean how i know what is the next address executed

Parents
  • A number of processors have support for conditional processing of instructions. That means that when they reach the instruction (in this case the second instruction), it checks a processor flag to decide if it should process the instruction or treat it as a NOP instruction and continue to the third instruction.

    The second instruction in this case is only performing a comparison if the first instruction found a match.

    The third instruction is also conditional. So it will only perform an ADD if the previous two instructions both compared equal. So the add only happens if instr1 arg1 == arg2 and instr2 arg1 == arg2.

    If instruction 2 sees a difference, then both second and third instructions will be treated as "NOP" instructions. If first instruction matches, and second instruction sees a mismatch, then the third instruction will be treated as a "NOP".

    So the only relation involved is that the conditional instructions will be processed or not, based on the result of previous instructions.

Reply
  • A number of processors have support for conditional processing of instructions. That means that when they reach the instruction (in this case the second instruction), it checks a processor flag to decide if it should process the instruction or treat it as a NOP instruction and continue to the third instruction.

    The second instruction in this case is only performing a comparison if the first instruction found a match.

    The third instruction is also conditional. So it will only perform an ADD if the previous two instructions both compared equal. So the add only happens if instr1 arg1 == arg2 and instr2 arg1 == arg2.

    If instruction 2 sees a difference, then both second and third instructions will be treated as "NOP" instructions. If first instruction matches, and second instruction sees a mismatch, then the third instruction will be treated as a "NOP".

    So the only relation involved is that the conditional instructions will be processed or not, based on the result of previous instructions.

Children