Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
16-bit MCU and DSC Programmer’s Reference Manual
DS70157F-page 472 © 2005-2011 Microchip Technology Inc.
__builtin_return_address
Description:
Returns the return address of the current function, or of one of its callers. For the level
argument, a value of 0 yields the return address of the current function, a value of 1 yields the
return address of the caller of the current function, and so forth. When level exceeds the current
stack depth, 0 will be returned. This function should only be used with a non-zero argument for
debugging purposes.
Prototype:
int _ _builtin_return_address (const int level);
Argument:
level Number of frames to scan up the call stack.
Return Value:
Returns the return address of the current function, or of one of its callers.
Assembler Operator / Machine Instruction:
return_address
__builtin_sac
Description:
Shifts value by shift (a literal between -8 and 7) and returns the value.
For example:
register int value asm("A");
int result;
result = _ _builtin_sac(value,3);
May generate:
sac A, #3, w0
Prototype:
int __builtin_sac(int value, int shift);
Argument:
value Integer number to be shifted.
shift Literal amount to shift.
Return Value:
Returns the shifted result to an accumulator.
Assembler Operator / Machine Instruction:
sac
Error Messages:
An error message appears if:
• the result is not an accumulator register
• the shift value is not a literal within range
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ64GA004-Programmers_Reference_Manual.pdf