Closed jtraglia closed 11 months ago
Just to be clear, this isn't a problem for me but I don't think it's what you want.
No, it was intentional. The rationale is that since portable switches to adx, why wouldn't it switch to shaext.
This is for non-portable builds though. By default it will do a runtime switch for sha functions, right?
Ah! I see your point. Still intentional:-) It would be weird to "punish" non-portable build in denying the switch.
In case you sense inconsistency in respect to being more rigid about ADX. Well, with ADX it's insufficient to simply pass some test vectors (based even on experience:-), in other words the verification bar is much higher.
Okay cool, that makes sense to me. Thanks 😄
Hi there. I noticed that the two routines for SHA are missing
__BLST_PORTABLE__
checks:https://github.com/supranational/blst/blob/3dd0f804b1819e5d03fb22ca2e6fac105932043a/src/asm/sha256-armv8.pl#L346-L350
And here in the x86 function: https://github.com/supranational/blst/blob/3dd0f804b1819e5d03fb22ca2e6fac105932043a/src/asm/sha256-x86_64.pl#L346-L350
So if the unoptimized
sha256_block_data_order
function is called, runtime detection will occur here without the__BLST_PORTABLE__
build flag. This will happen if__SHA__
and__ARM_FEATURE_CRYPTO
are not defined. I only noticed when comparing benchmarks and saw the same performance with & without the portable flag.Just to be clear, this isn't a problem for me but I don't think it's what you want.