ARM-optimised memset - General Discussion and Assistance - CHDK Forum supplierdeeply

ARM-optimised memset

  • 3 Replies
  • 2850 Views
ARM-optimised memset
« on: 06 / December / 2010, 06:33:14 »
Advertisements
I don't know if the Canon firmware memset code can be speeded-up but here is the basis for code that could be added to CHDK ARM utilities :-

http://old.nabble.com/ARM-optimised-memset-td29874059.html

I have not found any information on the stmhsia,stmcsia,stmmiia and strmih instructions.

Are these the ARM versions of the corresponding THUMB  instructions ?

Does bit 0 of the link register indicate whether the calling function is in ARM or THUMB mode ?

I am interested in clearing the raw buffer.

« Last Edit: 06 / December / 2010, 06:56:42 by Microfunguy »

Re: ARM-optimised memset
« Reply #1 on: 06 / December / 2010, 09:43:36 »
I found this site while web surfing. http://www.st.com/internet/mcu/family/141.jsp

It contains programming information on STI's range of ARM chips. There are a number of programming manuals and application notes.  I am not a programmer therefore I have no understanding what it all means.

I am just posting the link in case the information is useful to the ARM programmer guys.


Re: ARM-optimised memset
« Reply #2 on: 06 / December / 2010, 10:02:26 »
I am just posting the link in case the information is useful to the ARM programmer guys.

Thanks for that.

So much to learn and so little time .. and the application IS for panos .. stereo panoramas with a single camera  :)


David

*

Offline reyalp

  • ******
  • 12865
Re: ARM-optimised memset
« Reply #3 on: 06 / December / 2010, 12:21:54 »
I found this site while web surfing. http://www.st.com/internet/mcu/family/141.jsp
I would expect the documentation on the ARM site to be more appropriate to CHDK programmers in most cases. Canon appears to use a very vanilla implementation of 946E-S.

Regarding memset, I don't think you'll gain much over the firmware code, but it can't hurt much to try.

The code shown is ARM, thumb doesn't have condition flags on non-branch instructions. see ARM Architecture Reference Manual available on the ARM site. Several of the condition codes and addressing modes have multiple mnemonics for the same thing, which can make it look unfamiliar. Especially when the author uses two variants that mean the same thing in the same code :)
stmcsia = STore Multiple Carry Set Increment After
HS is the same as CS.

You can use BX LR to return and not worry about arm/thumb
Don't forget what the H stands for.


 

Related Topics