Counting the Assembler instructions in a block of C code 
Author Message
 Counting the Assembler instructions in a block of C code

I am writing an embedded C routine which has a very tight loop cycle
time and was wondering if you can get the compiler to calculate the
number of instructions in a particular block of code. The painstaking
way is to go through the assembler output and work it out, if anyone
has an easier way please let me know.

Cheers

Mark



Fri, 26 Aug 2005 20:05:05 GMT  
 Counting the Assembler instructions in a block of C code

Quote:

> I am writing an embedded C routine which has a very tight loop cycle
> time and was wondering if you can get the compiler to calculate the
> number of instructions in a particular block of code. The painstaking
> way is to go through the assembler output and work it out, if anyone
> has an easier way please let me know.

Unfortunately, this is completely implementation-dependent, and
therefore off-topic to comp.lang.c. Maybe, though, you might have more
luck in comp.arch.embedded.

Richard



Fri, 26 Aug 2005 21:09:20 GMT  
 Counting the Assembler instructions in a block of C code

Quote:

> I am writing an embedded C routine which has a very tight loop cycle
> time and was wondering if you can get the compiler to calculate the
> number of instructions in a particular block of code.

The compiler is beyond the scope of this newsgroup except that it lets you
run C. Try comp.arch.embedded or similar.

--
Freenet distribution not available
George Orwell was an optimist.



Sat, 27 Aug 2005 06:02:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Arguments in included assembler instructions

2. 32-bit assembler instructions in c?

3. inline assembler and Pentium specific instruction(s)

4. Dose VC++ 5.0 inline assembler support CPUID instruction?

5. How to compile Arm assembler instruction

6. counting number of instructions

7. CPUID instruction in _asm block

8. Newbie: separate big .cs file into small .cs files

9. prefetchnta instruction not in 386 instruction set

10. Include code in other Cs files

11. newbe/cs student, need help w/ code

12. Compile CS source code using ICodeCompiler

 

 
Powered by phpBB® Forum Software