Re: newbie: MUL product



På Thu, 29 Mar 2007 17:48:39 +0200, skrev Herbert Kleebauer <klee@xxxxxxxxx>:

Brian wrote:
On Thu, 29 Mar 2007 17:04:48 +0200, Herbert Kleebauer <klee@xxxxxxxxx>

>00000104: 66 f7 26 010e mulu.l val2,r0,r1|r0

What if my multiplier and multiplicand are both 32-bit to begin with,
and I'm in a 32 bit environment.

Are my options in that case as follows:

Define a QWORD (64-bit) "product" variable
move offset of product variable to register
?????

copy edx (high dword) to offset of product variable
copy eax (low dword) to (offset + 4)

copy eax to product_variable
copy edx to product_variable+4

Don't know the MASM syntax, someting like:

mov dword ptr product_variable,eax
mov dword ptr product_variable+4,edx

Or in a readable way:

move.l r0,product_variable
move.l r1,product_variable+4

and even more readable:

mov ebx Productvariable
mov D$ebx eax
mov D$ebx+4 edx

and in (\\o//'ex)

BB Productvariable
89 03
89 53 04

BB and 89 both are mov.
Does that mean that "mov, move" is a generalization?

Herbert, you assembler is simply bloat. :)






.



Relevant Pages

  • Re: floating point multiplier
    ... The simple answer is that it works like a 24-bit integer multiplier ... 24-bit significand). ... the left-most position (and with each shift, ... mov ebx, offset FLAT:a ...
    (comp.lang.asm.x86)
  • Re: sw multiply
    ... wastefull would be a moltiplication without a HW multiplier. ... push psw; store hi byte of 1st product ... mov a,h; ... pop psw hi order byte of 1st product ...
    (comp.arch.embedded)
  • Re: Fastcode Library Design
    ... cmp ecx, SMALLMOVESIZE ... lea edx, ... fild qword ptr [eax] ... mov ecx, ...
    (borland.public.delphi.language.basm)
  • Re: Time this code, please!
    ... xor(edx, edx); ... mov(d, eax); ... mov(width, ecx); ...
    (alt.lang.asm)
  • Re: Time this code, please!
    ... xor(edx, edx); ... mov(d, eax); ... mov(width, ecx); ...
    (alt.lang.asm)