RegisterUsage

RegisterUsage - restore them Case 2: Complex In sub2.s...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 330/330L Nios II Processor Register Usage September 17, 2007 Main: M , Subroutine: S , Argument: A , Results: R M-Regs R-Regs A-Regs S-Regs Case 1: Simple main.s sub.s In main.s Routine Use M-Regs freely, Set A-Regs and assume unchanged after call, Read R-Regs – move to M-Regs after call, and If using S-Regs then save them before call In sub.s Routine Use S-Regs freely, Read A-Regs but do not change, Set R-Regs, If using M-Regs then save and
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: restore them Case 2: Complex In sub2.s Routine Use S-Regs freely, Read A-Regs but do not change, Set R-Regs, and If using M-Regs then save and restore them main.s sub1.s sub2.s In sub1.s Routine Save/Restore M-regs, Save/Restore A-Regs, and Use M-Regs In main.s Routine Use M-Regs freely, Set A-Regs and assume unchanged after call, Read R-Regs - move to M-Regs after call, and If using S-Regs then save them before call...
View Full Document

This document was uploaded on 11/02/2011 for the course ECE 433 at Boise State.

Ask a homework question - tutors are online