This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does using the SRC directive reduce optimization?

I recall that with some of the many compilers I use, use of in-line assembly interferes with the compiler's optimizer because a compiler may not look at the assembly code to know what registers have/haven't been modified, and thus generates code assuming the worst, that registers have been modified, and generates inefficent code accordingly.

I don't recall if this is the case with Keil C. I'd appreciate it if someone could elaborate on C51's performance in this area, otherwise I'll have to generate test cases.

Thanks,

--Dan Henry