flat assembler
Message board for the users of flat assembler.

Index > Main > can the carry flag be renamed in sandy bridge?

Author
Thread Post new topic Reply to topic
tthsqe



Joined: 20 May 2009
Posts: 730
tthsqe
So I decided to try to improve my multiprecision multiplication function, and it comes down to this:

suppose you have a bunch of 128 bit integers xn and you want to add them to get the 192 bit sum.

Of course you can do

Code:
...
add SumLow,xnLow
adc SumHi,xnHi
adc SumCarry,0
... 
    


but the latency of adc is twice its throughput. So naturally one would be led to add of half of the terms separately (interleaving the instructions, of course) and combine the two partial sums at the end.

As I am currently unable to test this, I was wondering if anyone knows if this will lead to improvement.
Post 18 Jun 2012, 09:16
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17474
Location: In your JS exploiting you and your system
revolution
tthsqe wrote:
As I am currently unable to test this, I was wondering if anyone knows if this will lead to improvement.
Without actually testing code to see what happens, it is almost impossible to predict how it will perform on any modern CPU architecture.
Post 18 Jun 2012, 10:32
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Did you really mean Sandy Bridge or Ivy Bridge here? Anyways, dunno, but read this: http://www.emulators.com/docs/nx34_2011_avx.htm
Post 05 Jul 2012, 21:18
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.