https://github.com/llvm-mos/llvm-mos Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Project management - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] [search-key] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} llvm-mos / llvm-mos * Notifications * Star 41 * Fork 1 Experimental C compiler project for the MOS 6502 and related processors 41 stars 1 fork Star Notifications * Code * Issues 27 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 2 branches 9 tags Code Clone HTTPS GitHub CLI [https://github.com/l] Use Git or checkout with SVN using the web URL. [gh repo clone llvm-m] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @mysterymath mysterymath Multi-byte right shifts need to occur from high to low. ... b4c36d7 May 29, 2021 Multi-byte right shifts need to occur from high to low. b4c36d7 Git stats * 384,515 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Force brew update on Mac builds Apr 12, 2021 clang-tools-extra [clangd] Perform merging for stale symbols in MergeIndex Mar 30, 2021 clang Support GCC local register variables. May 17, 2021 compiler-rt [NFC][scudo] Produce debug info Mar 30, 2021 debuginfo-tests [dexter] Fix DexLimitSteps when breakpoint can't be set at requested ... Mar 23, 2021 flang [flang] Fix CHECK() calls on erroneous procedure declarations Mar 29, 2021 libc [libc] Fix msan/asan memcpy reentrancy Mar 30, 2021 libclc libclc: Add clspv target to libclc Mar 4, 2021 libcxx [libc++] Add a CI job to test the Runtimes build Mar 30, 2021 libcxxabi [libcxxabi] Use cxx-headers target to consume libcxx headers Mar 26, 2021 libunwind [libunwind] Install the DLL when doing "ninja install" Mar 7, 2021 lld Make --oformat CLI take precedence over linker script (as per GCC docs). May 14, 2021 lldb [lldb] Remove reproducer from previous test run Mar 30, 2021 llvm Multi-byte right shifts need to occur from high to low. May 29, 2021 mlir [mlir] Linalg: add tile interchange flag to test-linalg-codegen-strat... Mar 30, 2021 openmp [OpenMP] Trim error messages in CUDA plugin Mar 29, 2021 parallel-libs Reapply "Try enabling -Wsuggest-override again, using add_compile_opt... Jul 23, 2020 polly [Polly] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off builds Mar 25, 2021 pstl Rename top-level LICENSE.txt files to LICENSE.TXT Mar 11, 2021 runtimes [runtimes] Add the libc project to the list of runtimes. Mar 23, 2021 utils/arcanist Fix arc lint's clang-format rule: only format the file we were asked ... Oct 11, 2020 .arcconfig Add modern arc config for default "onto" branch Feb 22, 2021 .arclint PR46997: don't run clang-format on clang's testcases. Aug 5, 2020 .clang-format Add .clang-tidy and .clang-format files to the toplevel of the Jan 29, 2019 .clang-tidy - Update .clang-tidy to ignore parameters of main like functions for ... Jan 31, 2020 .git-blame-ignore-revs NFC: Add whitespace-changing revisions to .git-blame-ignore-revs Sep 22, 2020 .gitignore [NFC] Add CMakeUserPresets.json filename to .gitignore Jan 22, 2021 CONTRIBUTING.md Add contributing info to CONTRIBUTING.md and README.md Dec 2, 2019 README.md Update the README Mar 16, 2021 View code The LLVM-MOS Project Getting Started Overview Getting the Source Code and Building README.md The LLVM-MOS Project This directory and its sub-directories contain source code for LLVM-MOS, a project to port the LLVM toolkit to the MOS 6502. The README briefly describes how to get started with LLVM-MOS. Getting Started Modified from https://llvm.org/docs/GettingStarted.html. Overview Of the myriad LLVM projects, only Clang, LLD, and LLVM proper have received attention. The MOS target is still considered experimental (and unfinished!), so you need to pass -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="MOS" to cmake in order to actually build the new target. If you like, you can speed up the build by disabling the other targets: -DLLVM_TARGETS_TO_BUILD="". It's early days for Clang and the LLVM code generator, but the assembler and linker (LLD) are both MVP complete. Both use ELF as their object format; the target-specific ELF definitions were extended to accomodate the 6502. No libraries or platform support are included with this repository to keep it a clean fork of LLVM. These are contained in the related llvm-mos-sdk. The default mos target will only use compiler built-in include and library paths (e.g., stdint.h), so the compiler can be used without the SDK. However, the various platform subtargets (e.g. apple2e, c64, etc) used by the compiler driver will require the SDK to be present. See the SDK for more information as it develops. Getting the Source Code and Building The LLVM Getting Started documentation may be out of date. The Clang Getting Started page might have more accurate information. This is an example work-flow and configuration to get and build the LLVM source: 1. Checkout LLVM (including related sub-projects like Clang): + git clone https://github.com/llvm-mos/llvm-mos.git + Or, on windows, git clone --config core.autocrlf=false https: //github.com/llvm-mos/llvm-mos.git 2. Configure and build LLVM and Clang: + cd llvm-project + cmake -S llvm -B build -G -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="MOS" [options] Some common build system generators are: o Ninja --- for generating Ninja build files. Most llvm developers use Ninja. o Unix Makefiles --- for generating make-compatible parallel makefiles. o Visual Studio --- for generating Visual Studio projects and solutions. o Xcode --- for generating Xcode projects. Some Common options: o -DLLVM_ENABLE_PROJECTS='...' --- semicolon-separated list of the LLVM sub-projects you'd like to additionally build. Can include any of: clang, clang-tools-extra, libcxx, libcxxabi, libunwind, lldb, compiler-rt, lld, polly, or debuginfo-tests. For example, to build LLVM, Clang, libcxx, and libcxxabi, use -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi". o -DCMAKE_INSTALL_PREFIX=directory --- Specify for directory the full path name of where you want the LLVM tools and libraries to be installed (default /usr/local). o -DCMAKE_BUILD_TYPE=type --- Valid options for type are Debug, Release, RelWithDebInfo, and MinSizeRel. Default is Debug. o -DLLVM_ENABLE_ASSERTIONS=On --- Compile with assertion checks enabled (default is Yes for Debug builds, No for all other build types). + cmake --build build [-- [options] ] or your build system specified above directly. o The default target (i.e. ninja or make) will build all of LLVM. o The check-all target (i.e. ninja check-all) will run the regression tests to ensure everything is in working order. o CMake will generate targets for each tool and library, and most LLVM sub-projects generate their own check- target. o Running a serial build will be slow. To improve speed, try running a parallel build. That's done by default in Ninja; for make, use the option -j NNN, where NNN is the number of parallel jobs, e.g. the number of CPUs you have. + For more information see CMake Consult the Getting Started with LLVM page for detailed information on configuring and compiling LLVM. You can visit Directory Layout to learn about the layout of the source code tree. About Experimental C compiler project for the MOS 6502 and related processors Resources Readme Releases 9 tags Packages 0 No packages published Contributors 1,774 * @lattner * @topperc * @RKSimon * @espindola * @tkremenek * @ddunbar * @DougGregor * @rotateright * @arsenm * @d0k * @rui314 + 1,763 contributors * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.