That's now done using standard gcc builtin functions.

__attribute__((interrupt(ISR_VECTOR)))
void isr ()
{
  extern volatile void* ra_isr;
  extern volatile void* fa_isr;

  /* Read the vector to clear the interrupt. */
  (void)P1IV;
  /* { dg-final { scan-assembler "mov\t2\\(r4\\), &ra_isr *\n" } } */
  ra_isr = __builtin_return_address(0);
  /* { dg-final { scan-assembler "mov\tr4, &fa_fnma *\n" } } */
  fa_isr = __builtin_frame_address(0);
}


On Fri, May 18, 2012 at 4:19 PM, Sergei Sharonov
<[email protected]> wrote:
> Dear All,
> I am porting some old code from mspgcc v3.x  to v4.x and came across
> missing macro GET_FRAME_ADDR_F(). I was using that to determine
> from ISR if CPU was sleeping:
>   psr = (int *) GET_FRAME_ADDR_F(__FUNCTION__);
>   if((*psr & (LPM3_bits)) == LPM3_bits) { /* in LPM3 mode */
>         ....
>
> What is the preferred method of doing that with a new toolchain?
> Thanks,
> Sergei
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to