Code Monkey home page Code Monkey logo

Comments (6)

SpicyForthProgrammer avatar SpicyForthProgrammer commented on May 17, 2024

Yup its just an intresting issue, but making the level loader more portable isnt bad practice.

from principia.

griffi-gh avatar griffi-gh commented on May 17, 2024

This is not a real issue.

  1. Bit shifts work the same everywhere.
    Endianness is the order of bytes (not bits!) in memory.
    Integers (or any other data) have to be loaded into registers (which are neither little nor big-endian, they just store the entire 32/64 value at once) before the cpu can perform any operations on them.
  2. x86/x86_64 are always LE and ARM can do both (LE by default). Even if endianness somehow affected registers, it would still be at the lowest priority since big-endian architectures are extremely rare.

Close it. (Deleted my older comment because it was bad)

from principia.

griffi-gh avatar griffi-gh commented on May 17, 2024

Btw even if you remove them the compiler will optimize your basic math operations back down to bitwise ones (if possible), producing exactly the same binaries.

from principia.

SpicyForthProgrammer avatar SpicyForthProgrammer commented on May 17, 2024

Heavily depends on the compiler in general bit-shifting doesn't mean it wont load it could just mean levels on one cpu arch wont load on another.

from principia.

SpicyForthProgrammer avatar SpicyForthProgrammer commented on May 17, 2024

Ill see if i can get it to compile properly on ppc big endian then let you know my findings

from principia.

griffi-gh avatar griffi-gh commented on May 17, 2024

Heavily depends on the compiler in general bit-shifting doesn't mean it wont load it could just mean levels on one cpu arch wont load on another.

That may be a thing but it's not related to bitshifts

from principia.

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.