|
From: | Graham Davies |
Subject: | Re: [avr-chat] Missed Optimisation ? |
Date: | Tue, 01 Mar 2011 06:56:53 -0500 |
bob wrote:
... The code is very simple (runs in Port Change interrupt): if ((PINA & _BV(A2DDATA)) != 0) result |= 0x80000000; result >>= 1;
How is result declared? Are you using the volatile qualifier? If so, that would explain why the compiler feels obliged to load and store the entire 32 bits.
Graham.
[Prev in Thread] | Current Thread | [Next in Thread] |