Giter Site home page Giter Site logo

Comments (4)

samuelgruetter avatar samuelgruetter commented on September 3, 2024

There are two sextend: The one you have in mind (which goes from one word size to another word size) and the one currently in here (which ignores the upper bits of the input word). Both have valid use cases.

from coqutil.

andres-erbsen-sifive avatar andres-erbsen-sifive commented on September 3, 2024

I understand, but why is it in the word interface?

from coqutil.

samuelgruetter avatar samuelgruetter commented on September 3, 2024

Would you prefer to implement sextend in terms of "more fundamental" operations like testbit, bitwise and, shift, etc? This should work, the question is just whether some day we care about performance of evaluating word expressions and find a super efficient word representation with a native sextend, then it would be better to have it in the interface. Not sure though how relevant that scenario is but that's what I had in mind when I was working on the interface.

from coqutil.

andres-erbsen-sifive avatar andres-erbsen-sifive commented on September 3, 2024

I think my main concern is that sextend does not seem like a natural word operation to me, in that its input is not clearly of the same type of as the output. Thus I would define it as an operation that does work on words, but is not a required part of the word interface.

from coqutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.