Giter Site home page Giter Site logo

Comments (3)

cnlohr avatar cnlohr commented on August 17, 2024

Woah... I never thought about that! That's very cool. I won't be able to get to this in the next day or so - I will check into it soon after.

from mini-rv32ima.

cnlohr avatar cnlohr commented on August 17, 2024

For completeness sake, this is the correct phrasing for the second one:

uint32_t immm4 = ((ir & 0xf00)>>7) | ((ir & 0x7e000000)>>20) | ((ir & 0x80) << 4) | ((uint32_t)((int32_t)ir >> 19) & 0xfffff000);

I am at a bit of an impass. I like the code the way you put it better, but doing optimizations takes the code from 15036 compiled to the same size for the second optimization (And appears to be the same code)... and if I do the first optimization, the code 15148 bytes!! And diffing the .lst's, I can't even figure out why. The compiler just like loses its mind when it goes through a signed typecast.

The first seems like it should be such an obvious win, but the compiler's fighting me and it's got hands.

from mini-rv32ima.

cnlohr avatar cnlohr commented on August 17, 2024

#44

from mini-rv32ima.

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.