05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

eturn;<br />

VCR_Recent_IRQ_NS_Valid = TRUE;<br />

Debug Events<br />

// VCRVectorMatch()<br />

// ================<br />

//<br />

// The result of this function says whether iaddr <strong>and</strong> eaddr match for vector catch purposes:<br />

// TRUE if they definitely match<br />

// boolean UNKNOWN if it is UNPREDICTABLE whether they match<br />

// FALSE if they definitely do not match<br />

boolean VCRVectorMatch(bits(32) iaddr, boolean first, bits(32) eaddr)<br />

match = FALSE;<br />

unpred = FALSE;<br />

if eaddr == iaddr then<br />

if eaddr == iaddr then<br />

// Exact address match is a definite match if on the first unit of the instruction,<br />

// otherwise an UNPREDICTABLE match.<br />

if first then match = TRUE; else unpred = TRUE;<br />

else<br />

// Check for other cases of UNPREDICTABLE matches.<br />

case CurrentInstrSet() of<br />

when InstrSet_<strong>ARM</strong><br />

unpred = TRUE;<br />

when InstrSet_Thumb, InstrSet_ThumbEE<br />

if iaddr == eaddr then unpred = TRUE;<br />

if iaddr == ‘10’ && eaddr == ‘00’ then unpred = TRUE;<br />

when InstrSet_Jazelle<br />

if eaddr == ‘00’ then unpred = TRUE;<br />

if eaddr == ‘10’ && iaddr == ‘11’ then unpred = TRUE;<br />

if match then<br />

return TRUE;<br />

elsif unpred then<br />

return boolean UNKNOWN;<br />

else<br />

return FALSE;<br />

// VCRMatch()<br />

// ==========<br />

boolean VCRMatch(bits(32) address, boolean first)<br />

// Determine addresses for IRQ <strong>and</strong> FIQ comparisons.<br />

if SCTLR.VE == ‘0’ then<br />

VCR_Recent_IRQ_S_Valid = FALSE; VCR_Recent_IRQ_NS_Valid = FALSE;<br />

VCR_Recent_FIQ_S_Valid = FALSE; VCR_Recent_FIQ_NS_Valid = FALSE;<br />

irq_addr = ExcVectorBase() + 24; irq_addr_v = TRUE;<br />

fiq_addr = ExcVectorBase() + 28; fiq_addr_v = TRUE;<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. C3-33

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!