Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: gcc problem / why (or not) to use ARM mode

2005-07-19 by 42Bastian Schick

lpc2100_fan <lpc2100_fan@...> schrieb am Mon, 18 Jul 2005 16:03:08 
-0000:

> just a brief comment about ARM mode and THUMB mode. Depending on the
> memory architecture and access time ARM mode can be good (faster) or
> very bad (larger and slower).

2nd reply, just to make my opinion clearer:

My rule of thumb :-) is, smaller code results in faster code.
Therefor I use Thumb mode and compile with -Os.
But as every rule, there are exceptions like the following, which gives
nice code in ARM mode (though larger):

int f[100];
int v[100];
int a (void)
{
	int i;
	int sum = 0;
	for(i = 0; i < 100; ++i){
		sum += f [i]*v[i];
	}
	return sum;
}


-- 
42Bastian Schick

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.