ARM Technical Support Knowledge Articles

_PUSH_ INTRINSIC LIBRARY ROUTINE

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

Is there a way to PUSH variables onto the system stack in C?

ANSWER

Yes. The _push_ intrinsic library function inserts a PUSH instruction into the program which pushes a 16-bit value onto the system stack. For example:

#include <intrins.h>

void testpop (void)  {
  volatile unsigned temp;

  _push_ (temp);
  temp = _pop_ ();
}

MORE INFORMATION

SEE ALSO

Article last edited on: 2005-10-20 07:43:12

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential