control-flow

control-flow - CSE 379 The CPSR & Branching Current...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 379 Current Program Status Register Stores condition codes Condition Code Flags Negative (N) - Negative Result Zero (Z) - Zero Result Carry (C) - Carry Out Overflow (V) - Overflow into Sign Bit Processor Mode (Mode) Instruction Set (T) Interrupt Enables (IF) Fast or Normal Comparison Operations CMP Compare Flags set as a result of Rn - N N can be immediate data or a register Example CMP r3, r1 CMP r2, #0xA9 CMN Compare Negated Flags set as a result of Rn + N N can be immediate data or a register Example CMN r0, r1 CMN r0, #32 TEQ Test for equality of two 32-bit values Flags set as a result of Rn N N can be immediate data or a register Example TEQ r2, r1 TEQ r0, #-9 28 27 8 7 6 5 4 3 2 1 0 29 30 31 C V I F T Mode Unused Z N
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
TST Tests bits of a 32-bit value N can be immediate data or a register Example TST r4, r5 TST r2, #0xF6 The Branch Instruction Branch B{cond} label Branch and Link BL{cond} label Conditions Unconditional (B)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

control-flow - CSE 379 The CPSR & Branching Current...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online