Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Assembly Language v C and Embedded Development: !gcc for PIC16F84



On Thu, 10 Mar 2011 19:13:59 +0900
Lewske Wada <ryu@example.com> wrote:

> How about
> 
> mov bx, ax
> shl bx, 3
> sub bx, ax
> 
> to get 7 times ax?

I'm actually not sure whether this is faster than a

mul ax, 7

on modern processors.
Please keep in mind that logic delay is virtually zero for
most functions, even complex ones like multiplies, while
codes like the one abve induce pipeline stals because the
result of the previous operation is used imediatly.


			Attila Kinali

-- 
It is the unknown we fear when we look
upon death and darkness, nothing more.
	-- Albus P. W. B. Dumbledore


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links