supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
458 stars 175 forks source link

Include portable and non-portable assembly files #163

Closed jtraglia closed 1 year ago

jtraglia commented 1 year ago

First and foremost, sorry about how big this PR is. Most of the changes are in generated files though. I'm open to any alterations you might have in mind. I want to make these changes in preparation for CPU runtime detection; if not in this repository, then to minimize the differences with a fork that does.

The biggest part of this PR adds a prefix (${pre}) to the beginning of labels for internal routines for assembly files that have multiple implementations. This allows us to include both portable & non-portable implementations. Then select the right implementation based on the defines.

As an overview, this will:

Other considerations:

Also, for most of the replacements I did this in vim, for each of those perlasm files:

:%s/___/FOOBARS/g
:%s/__/${pre}__/g
:%s/FOOBARS/___/g
dot-asm commented 1 year ago

I'm inclined to say that you're overthinking it. I'd rather do it as in #165. The referred PR is just the very first step, more steps to come...

jtraglia commented 1 year ago

Yeah that PR looks much simpler. Let's go that route 👍