Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 20:54
George_George16-Jul-08 20:54 
AnswerRe: Two basic questions about generated assembly Pin
CPallini15-Jul-08 21:43
mveCPallini15-Jul-08 21:43 
GeneralRe: Two basic questions about generated assembly Pin
George_George15-Jul-08 21:49
George_George15-Jul-08 21:49 
GeneralRe: Two basic questions about generated assembly Pin
Stephen Hewitt15-Jul-08 22:20
Stephen Hewitt15-Jul-08 22:20 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 0:48
George_George16-Jul-08 0:48 
AnswerRe: Two basic questions about generated assembly Pin
Rajesh R Subramanian16-Jul-08 1:07
professionalRajesh R Subramanian16-Jul-08 1:07 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 1:14
George_George16-Jul-08 1:14 
GeneralRe: Two basic questions about generated assembly Pin
jhwurmbach16-Jul-08 4:27
jhwurmbach16-Jul-08 4:27 
Yes, LEA means "Load effective address". But lead can not only load an address, it can compute it on the fly.
LEA EAX,[ESP+14]
puts the result of (value of ESP) plus 14 into EAX.

And it can compute more complicated calculations:
LEA EAX,[EAX*4+EAX]
works, and as I got from the text you have given, it does not actually use a calculation (involving things like cache access and multiply units). Instead, it uses a table lookup. But that does only work for for some multipliers.

So, in effect, for certain multipliers, LEA is faster than MUL is.

Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all.
Douglas Adams, "Dirk Gently's Holistic Detective Agency"

GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 20:35
George_George16-Jul-08 20:35 
GeneralRe: Two basic questions about generated assembly Pin
jhwurmbach17-Jul-08 7:19
jhwurmbach17-Jul-08 7:19 
GeneralRe: Two basic questions about generated assembly Pin
George_George17-Jul-08 20:58
George_George17-Jul-08 20:58 
AnswerRe: Two basic questions about generated assembly Pin
Rajesh R Subramanian15-Jul-08 22:05
professionalRajesh R Subramanian15-Jul-08 22:05 
GeneralRe: Two basic questions about generated assembly Pin
George_George15-Jul-08 22:20
George_George15-Jul-08 22:20 
AnswerRe: Two basic questions about generated assembly Pin
cp987616-Jul-08 1:09
cp987616-Jul-08 1:09 
GeneralRe: Two basic questions about generated assembly Pin
George_George16-Jul-08 19:19
George_George16-Jul-08 19:19 
QuestionSendMessage in Hooked application Pin
nitin315-Jul-08 20:51
nitin315-Jul-08 20:51 
AnswerRe: SendMessage in Hooked application Pin
Naveen15-Jul-08 21:05
Naveen15-Jul-08 21:05 
AnswerRe: SendMessage in Hooked application Pin
Hamid_RT16-Jul-08 0:53
Hamid_RT16-Jul-08 0:53 
Questioncheck on invalid IP address [modified] Pin
rajveer2115-Jul-08 20:42
rajveer2115-Jul-08 20:42 
GeneralRe: check on invalid IP address Pin
CPallini15-Jul-08 20:51
mveCPallini15-Jul-08 20:51 
AnswerRe: check on invalid IP address Pin
Rajesh R Subramanian15-Jul-08 20:52
professionalRajesh R Subramanian15-Jul-08 20:52 
AnswerRe: check on invalid IP address Pin
Hamid_RT16-Jul-08 0:54
Hamid_RT16-Jul-08 0:54 
GeneralRe: check on invalid IP address Pin
rajveer2116-Jul-08 1:06
rajveer2116-Jul-08 1:06 
QuestionUse of Enter key on TreeCtrl. Pin
Le@rner15-Jul-08 20:10
Le@rner15-Jul-08 20:10 
Questionprocess termination Pin
George_George15-Jul-08 20:10
George_George15-Jul-08 20:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.