Code Monkey home page Code Monkey logo

Comments (2)

vnmakarov avatar vnmakarov commented on July 2, 2024

You can consider MIR VM is 64-bit register machine. 32-bit insns work with only 32-bit part of 64-bit registers (vars). What happens with another part of 64-bit register is not defined (for some environment another part can be not changed, for other environments another part can be zeroed etc).

That is why integer variables can be declared only as 64-bit integers. Function parameter declaration is an exception used to declare how parameter passing. Still integer parameters are 64-bit too.

For 64-bit registers, you need only 64-bit mov. If you want to move 32-bit value with zeroing another part of 64-bit register you can use UEXT32. To do move with sign extension you can use EXT32.

So MIR currently is oriented for efficient implementation on 64-bit machines. But with small effort implementation on 32-bit machines can be efficient too (of course if you use mostly 32-bit insns).

Originally MIR had no 32-bit insns. But to implement 32-bit arithmetic a lot of extension insns would require (for insn operands and results). So I decided that it is easier to add 32-bit insns.

from mir.

sletz avatar sletz commented on July 2, 2024

Thanks !
I've got some sound coming from the Faust => MIR translator ((-; more later.

from mir.

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.