Coder Social home page Coder Social logo

Can't memset a zeropage array about llvm-mos HOT 3 OPEN

cogwheel avatar cogwheel commented on September 25, 2024
Can't memset a zeropage array

from llvm-mos.

Comments (3)

asiekierka avatar asiekierka commented on September 25, 2024

After #369 , this leads to a crash due to an illegal COPY being emitted where an 8-bit GPR is assigned to RS1.

Essentially, pointers need to be automatically promoted between address spaces for this to work correctly - for now, after said PR gets merged, you can work around this by casting manually: memset((char*) intthing, 42, 10);.

I'm not sure what the correct way to fix this is.

from llvm-mos.

mysterymath avatar mysterymath commented on September 25, 2024

@asiekierka , if you get around to this, take a look at isAddressSpaceSupersetOf in clang/AST/Type.h. I think that logic determines whether an implicit conversion between address spaces is attempted.

EDIT: It doesn't look like there's any target plumbing for this... concerning. We may need to create this ex nihilo. We should see if that would even help first.

from llvm-mos.

asiekierka avatar asiekierka commented on September 25, 2024

That's fine. Target plumbing is handled elsewhere, just by virtue of the SupersetOf function being of the "assume explicit conversion if not" kind.

However, that method is never called to check for a difference between the zero-page pointer type and non-zero-page pointer type in the first place. I'm worried we may be brushing up on the limits of Clang's address space handling (mostly built to satisfy AMD's OpenCL needs).

from llvm-mos.

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.