Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about Dir 4.3 when a static function contains only variable declaration, asm and return statement
#8
we have an additional question here, what about the following example, is it still acceptable:

Code:
static inline uint32_t test(void) {
uint32_t tmp;
__asm__ __volatile__( "mrc p15, 0, %0, c1, c0, 2\n\t" : "=r" (tmp) );
return tmp + 1;  // key point here, it's not simple return `tmp`
}

please help clarify for this case, many thanks in advance!
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)