| Electronic Components Datasheet Search |
|
AVR32AP Datasheet(PDF) 68 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AVR32AP Datasheet(HTML) 68 Page - ATMEL Corporation |
|
68 / 181 page ![]() 68 32001A–AVR32–06/06 AVR32 5.2.9 Return stack The return stack is a 4-entry circular buffer, holding the return addresses for call instructions. The ID stage controls the pushing of return addresses to the return stack. When A1 detects a rcall, icall, mcall or acall instruction, the address of the instruction following the call (the instruc- tion in IS) is pushed. This is the return address. There are two types of return instructions: Predicted taken and predicted not taken. The predic- tion is statically based on the instruction opcode, as shown in Table 5-2. Predicted taken return instructions will cause a return stack pop and execution will continue as soon as possible from the new path. Predicted not taken return instructions will not cause a return stack pop until it has reached the A1 stage and the condition is evaluated to be true. When ID detects a predicted taken return instruction, the top-of-stack element is popped and used as an instruction fetch address. The return stack is circular, and overflow is handled by hardware by means of a saturating valid-element counter. If a predicted taken return instruction is encountered and the return stack is empty, the return instruction will still be executed cor- rectly, but with a cycle penalty. The instructions in Table 5-2 are considered return-instructions. No other instructions or mecha- nisms should be used to return from call-instructions. Violation of this rule will place hardware in an undetermined state. If the user wants to return from call-instructions by other means than the instructions listed in Table 5-2, the return stack must be disabled by clearing the Return Stack Enable (RE) bit in CPUCR. Another approach is to flush the return stack before returning by exe- cuting the flush return stack (frs) instruction. 5.2.10 Reset The return stack is enabled and empty after reset. 5.2.11 Disabling The return stack is disabled by clearing the Return Stack Enable (RE) bit in CPUCR. Disabling the stack will reset the element counter, removing all entries. Table 5-2. Predictable return instructions Instruction Prediction mov pc, lr Taken ret, cond == AL Taken ret, cond != AL Not taken popm with PC in register list Taken ldm with PC in register list Taken |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |