[curves] Distribution-ready optimized code

Andrew Moon liquidsun at gmail.com
Mon Apr 6 22:01:39 PDT 2015

qhasm is nice, but feels like it needs more support. A maintained repo
with an up to date set of architectures and documentation would help a
lot. Every time I try to use it, I run in to instructions that are
missing, then try to figure out/remember how to add new instructions,
then get worried that I might use an crappy operator/name for it and
could be embarrassed if I distribute it, then etc etc etc and decide
it's too much trouble. (having to look up the syntax for compare/jump
usually pushes me over the edge). You can semi-program it with Peters
https://cryptojedi.org/programming/maq.shtml which does help with some
of the "this repetition is killing me" stuff that is unavoidable with

asm-opt is a workable solution (at least for getting asm in to
projects, not for creating the asm), but not optimal. You still have
to manually touch up the final file a bit, where it's obviously easier
for qhasm/PeachPy/whatever to generate the required mark-up
information in the intermediate file based on the source.

On Fri, Apr 3, 2015 at 2:11 PM, Trevor Perrin <trevp at trevp.net> wrote:
> On Fri, Apr 3, 2015 at 4:02 AM, Andrew Moon <liquidsun at gmail.com> wrote:
>> Ideally, I think I'd want two different steps: An easy to use
>> "programmable assembler assembler" which handles boring stuff like
>> register allocation, stack allocation, instruction set validation,
>> constant data, stream interleaving (ARM), maybe a cycle/pipeline
>> analyzer such as http://pulsar.webshaker.net/ccc/ if I got greedy. I
>> guess I'm mostly describing PeachPy, but parsing some kind of source
>> file instead of the nasty python code; something that makes writing
>> the exact instructions you want as painless/efficient as possible.
> Hi Andrew,
> That makes sense - I'm curious why you didn't bring up qhasm though -
> how close is it to meeting those goals?
> Also, I think you work on asm-opt [1], another interesting project in
> this space.  Is that a potential solution here?
> Trevor
> [1] https://github.com/floodyberry/asm-opt

More information about the Curves mailing list