You need to write your assembly to handle interrupts properly.  For example, 
you need to make sure that the stack pointer is double-word aligned at any time 
where interrupts are enabled.  That means you could not do two "pushes" in a 
row to the stack.  Rather you would need to increment the stack by 2 words and 
then use an indexed address mode to write the words into the space you just 
allocated.

If you follow the guidelines in the C Compiler Guide *precisely* then you'll 
find many of these things are taken care of.

If you're using the SPLOOP hardware instead of writing software-pipelined loops 
then that will allow you to have interruptible code.

Brad

> -----Original Message-----
> From: davinci-linux-open-source-boun...@linux.davincidsp.com
> [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com] On Behalf
> Of Zuber
> Sent: Friday, February 27, 2009 12:21 AM
> To: davinci-linux-open-source@linux.davincidsp.com
> Subject: Hand written assembly code
> 
> Hi All,
> 
> I am working on video codec optimization. In this,to get more
> optimization i have converted some of c functions in to the assembly.
> Now my question is, will this hand written assembly creates problems in
> terms of interrupt handling.
> Because i heard from some one that hand written assembly would not
> handle interrupts properly.
> So can anybody explain or confirm me about such issue or any other
> suggestion related to this will help me to go further.
> 
> --
> Regards,
> Zuber Saiyed
> Embedded Engineer
> e-Infochips Ltd.
> 11/A-B, Chandra Colony, Off C.G. Road,
> Ellisbridge, Ahmedabad - 380006
> Telephone :- 079-2656 3705 Ext :- 126
> www.einfochips.com
> 
> --
> _____________________________________________________________________
> Disclaimer: This e-mail message and all attachments transmitted with it
> are intended solely for the use of the addressee and may contain legally
> privileged and confidential information. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to the intended recipient, you are hereby
> notified that any dissemination, distribution, copying, or other use of
> this message or its attachments is strictly prohibited. If you have
> received this message in error, please notify the sender immediately by
> replying to this message and please delete it from your computer. Any
> views expressed in this message are those of the individual sender
> unless otherwise stated.Company has taken enough precautions to prevent
> the spread of viruses. However the company accepts no liability for any
> damage caused by any virus transmitted by this email.
> __________________________________________________________________________
> 
> 
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to