Thread View: borland.public.delphi.basm
3 messages
3 total messages
Started by ADS
Mon, 09 Sep 2002 07:17
how to divide in MMX?
Author: ADS
Date: Mon, 09 Sep 2002 07:17
Date: Mon, 09 Sep 2002 07:17
22 lines
1337 bytes
1337 bytes
Hello, I have a code to do a addition in MMX. how can I do a divide? I have not found a MMX equivalent. type T16bit = array[0..3] of word; procedure AdditionMMX(A,B : T16bit; var resultat : T16bit); register; // adresse de A dans EAX // adresse de B dans EDX // adresse de resultat dans ECX asm movq mm0,[EAX] paddw mm0,[EDX] movq [ECX],mm0 end; thanks Armindo
Re: how to divide in MMX?
Author: Guido Gybels
Date: Mon, 09 Sep 2002 07:47
Date: Mon, 09 Sep 2002 07:47
14 lines
1352 bytes
1352 bytes
"ADS" <nospam@wanadoo.fr> wrote in message news:3d7c4b0c$1@newsgroups.borland.com... > how can I do a divide? I have not found a MMX equivalent. The MMX set does not have a division instruction. You'll have to use div/idiv. For division by a power of 2, use shifts. Guido -- Guido Gybels http://www.optimalcode.com/Guido (Disclaimer: all remarks made apply to Intel processors unless specified otherwise)
Re: how to divide in MMX?
Author: ADS
Date: Mon, 09 Sep 2002 09:07
Date: Mon, 09 Sep 2002 09:07
14 lines
1359 bytes
1359 bytes
> > The MMX set does not have a division instruction. You'll have to use > div/idiv. For division by a power of 2, use shifts. > So if I understand well I have to do the divide for each for words instead of doing one operation (MMX advantage)? thanks Guido Armindo
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads