Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to ARM small Karatsuba muls #34

Merged
merged 5 commits into from
Jun 10, 2022
Merged

Improvements to ARM small Karatsuba muls #34

merged 5 commits into from
Jun 10, 2022

Conversation

jargh
Copy link
Contributor

@jargh jargh commented Jun 10, 2022

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jargh and others added 5 commits May 13, 2022 14:49
The new functions ARM_MACRO_SIM_ABBREV_TAC and X86_MACRO_SIM_ABBREV_TAC
are designed as analogs of ...SUBROUTINE_SIM_TAC but are a bit more
flexible (allowing the subgoal to be generated from a template and
proved per instance instead of requiring a general theorem) as well
as doing a bit more work to infer parameters from the current state.

This also tweaks away the need to use "word(pc + 0)" instead of just
"word pc" in subroutine simulation, and makes a few other changes to
clean up loading in conjunction with other theories:

 - Use fully-expanded form of the p_25519 = 2^255 - 19 constant as in
   https://github.com/jrh13/hol-light/blob/master/EC/curve25519.ml

 - Rename the x86 mask registers "k1" -> "kmask1" etc. (otherwise
   they steal too much namespace for something not currently used).

 - Partially evaluate some quotations in NONOVERLAPPING_TAC. Less
   brittle and slightly faster as a result.
The ARM functions that involve multiplying 4-digit (256-bit) numbers
at the top level previously used an integrated "arbitrary degree
Karatsuba" algorithm. This switches from the ADK approach to a
classic 2-level Karatsuba, which seems a slight performance
improvement on many relevant microarchitectures. The _alt forms
designed for faster microarchitectures are unchanged and still
use straightforward schoolbook arrays.
@jargh jargh requested review from dkostic and nebeid June 10, 2022 16:58
@jargh jargh merged commit 5162347 into awslabs:main Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants