deleteregister - Remove registers from list of saved registers in savedregs property of function objects

Syntax

deleteregister(ff,regname)
deleteregister(ff,reglist)

Description

deleteregister(ff,regname) removes register regname from the list of registers that get preserved or reverted when a function is finished running. ff identifies the program function to which the register applies. You can delete any register you added from the saved registers list. You cannot delete registers that are on the default list of saved registers — the must save registers.

When you issue the createobj call to create a handle to a function, the compiler creates the default list of saved registers. When you execute the function, the compiler saves the registers in the list, runs its process, and after completing its process, restores the saved registers to their initial state using the contents of the saved registers.

After a function generates a result, the execution process returns the saved registers to their initial states and values. When you delete a register you added to the saved registers list, the deleted register is not restored or saved with other registers in the list.

For each processor family, the default list of saved registers changes, as shown in these sections. The default lists include registers that the compiler saves and that MATLAB software requires for Embedded IDE Link CC to operate correctly.

Default Saved Registers for C28x Processors

AL, AH, AR0, AR1, AR2, AR3, AR4, AR5, AR6, AR7, XAR0, XAR1, XAR2, XAR3, XAR4,XAR5, XAR6, XAR7, SP, T, TL, PL, PH, DP

Default Saved Registers for C54x Processors

AR1, AR6, AR7, and SP (required by MATLAB software, not the compiler)

Default Saved Registers for C55x Processors

T0, T1, T2, T3, TRN0, TRN1, AR0, AR1, AR2, AR3, AR4, AR5, AR6, AR7, XAR0, XAR1, XAR2, XAR3, XAR4, XAR5, XAR6, XAR7, AC0, AC1, AC2, AC3

Default Saved Registers for C62x and C67x Processors

A0, A2, A6, A7, A8, A9. Also B0, B1, B2, B4, B5, B6, B7, B8, B9. To support MATLAB software requirements, B15 (the stack pointer) gets saved as well.

Registers A3, A4, A5, and B3 — your function must preserve these but they are not needed for reading function output.

Default Saved Registers for C64x Processors

A0, A2, A6, A7, A8, A9, A16, A17, A19, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31. Also B0, B1, B2, B4, B5, B6, B7, B8, B9, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B26, B27, B28, B29, B30, B31. To support MATLAB software requirements, B15 (the stack pointer) gets saved as well.

Register B15 — not required by the compiler, but is required by MATLAB software and is saved.

Registers A3, A4, and A5 — function must preserve these but they are needed for reading function output.

Default Saved Registers for R1x and R2x Processors

R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14,R15

deleteregister(ff,reglist) deletes the register names in reglist from the list of registers that get preserved when a task is finished. ff identifies the function to which the register applies. reglist is a cell array that contains the names of registers to remove from the saved registers collection.

See Also

addregister

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS