Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-28 Thread Peter Bigot
On Tue, Apr 17, 2012 at 9:03 AM, David Brown wrote: > On 17/04/2012 13:44, Peter Bigot wrote: >> >> On Tue, Apr 17, 2012 at 5:02 AM, David Brown >>  wrote: >>> With gcc for the msp430, there is also a "critical" function attribute - >>> you can put your critical accesses within a small static inli

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-19 Thread Grant Edwards
On 2012-04-19, JMGross wrote: > - Urspr?ngliche Nachricht - > Von: Grant Edwards > Gesendet am: 17 Apr 2012 21:40:59 > > On 2012-04-17, JMGross wrote: > >>> Access to word members inside a packed struct is NOT done as a word >>> read/write, but through a rather complex chainof operation,

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-19 Thread JMGross
- Ursprüngliche Nachricht - Von: Grant Edwards Gesendet am: 17 Apr 2012 21:40:59 On 2012-04-17, JMGross wrote: >> Access to word members inside a packed struct is NOT done as a word >> read/write, but through a rather complex chainof operation, because >> the alignment of the struct and

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-18 Thread David Brown
On 18/04/2012 03:36, William Swanson wrote: > On Tue, Apr 17, 2012 at 7:03 AM, David Brown wrote: >> You have to be particularly careful about read-modify-write codings. >> The msp430 can do some of these actions atomically, but it is possible >> that the compiler will split the actions up. For e

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread William Swanson
On Tue, Apr 17, 2012 at 7:03 AM, David Brown wrote: > You have to be particularly careful about read-modify-write codings. > The msp430 can do some of these actions atomically, but it is possible > that the compiler will split the actions up.  For example, if you write > "a += 1; b = a" then then

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Wayne Uroda
..@mac.com] Sent: Wednesday, 18 April 2012 8:48 AM To: GCC for MSP430 - http://mspgcc.sf.net Subject: Re: [Mspgcc-users] Stack push inside inline assembly On Apr 17, 2012, at 3:02 AM, David Brown wrote: > You've just been lucky. In particular, gcc is pretty aggressive about optimizing

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread William "Chops" Westfield
On Apr 17, 2012, at 3:02 AM, David Brown wrote: > You've just been lucky. In particular, gcc is pretty aggressive about optimizing away stack frames when it can (putting local variables in registers, rather than explicitly on the stack.) (I *think* this is NOT target specific…) BillW -

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Grant Edwards
On 2012-04-17, Grant Edwards wrote: > On 2012-04-17, JMGross wrote: > >> Access to word members inside a packed struct is NOT done as a word >> read/write, but through a rather complex chainof operation, because >> the alignment of the struct and therefore of the member is unknown. > > Why is the

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Grant Edwards
On 2012-04-17, JMGross wrote: > Access to word members inside a packed struct is NOT done as a word > read/write, but through a rather complex chainof operation, because > the alignment of the struct and therefore of the member is unknown. Why is the alignment of a structure member unkown? Unle

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread JMGross
- Ursprüngliche Nachricht - Von: Peter Bigot Gesendet am: 17.April.2012 13:44:39 >> That should work. =A0Like many people (and all serious coding standards), >> I don't like putting brackets in macros - but that's your choice. >Nothing wrong with brackets in macros. Mismatched brackets

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Peter Bigot
On Tue, Apr 17, 2012 at 9:03 AM, David Brown wrote: > On 17/04/2012 13:44, Peter Bigot wrote: >> >> On Tue, Apr 17, 2012 at 5:02 AM, David Brown >>  wrote: >>> >>> On 17/04/2012 09:53, Wayne Uroda wrote: Hi, I feel quite foolish asking the following question... Please don't jud

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread David Brown
On 17/04/2012 13:44, Peter Bigot wrote: > On Tue, Apr 17, 2012 at 5:02 AM, David Brown wrote: >> On 17/04/2012 09:53, Wayne Uroda wrote: >>> Hi, >>> >>> I feel quite foolish asking the following question... Please don't judge me >>> too harshly... >>> >>> In my MSPGCC based system I have got the

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Peter Bigot
On Tue, Apr 17, 2012 at 5:02 AM, David Brown wrote: > On 17/04/2012 09:53, Wayne Uroda wrote: >> Hi, >> >> I feel quite foolish asking the following question... Please don't judge me >> too harshly... >> >> In my MSPGCC based system I have got the following #defines which I use for >> critical (

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Peter Bigot
On Tue, Apr 17, 2012 at 2:53 AM, Wayne Uroda wrote: > Hi, > > I feel quite foolish asking the following question... Please don't judge me > too harshly... > > In my MSPGCC based system I have got the following #defines which I use for > critical (interrupts disabled) access around volatile memor

Re: [Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread David Brown
On 17/04/2012 09:53, Wayne Uroda wrote: > Hi, > > I feel quite foolish asking the following question... Please don't judge me > too harshly... > > In my MSPGCC based system I have got the following #defines which I use for > critical (interrupts disabled) access around volatile memory which is >

[Mspgcc-users] Stack push inside inline assembly

2012-04-17 Thread Wayne Uroda
Hi, I feel quite foolish asking the following question... Please don't judge me too harshly... In my MSPGCC based system I have got the following #defines which I use for critical (interrupts disabled) access around volatile memory which is modified by interrupt routines: #define criticalStar