All Projects → mclos → los

mclos / los

Licence: Unknown, Unknown licenses found Licenses found Unknown license.md Unknown license-en.md
Los是一个c/c++语言编译型的虚拟机。它使用llvm/clang作为其前端,losld做后端对源代码进行编译,生成los指令文件。Los is a c/c++-compiled virtual machine. It uses llvm/clang as its front end, losld does the backend to compile the source code, and generates the los directive file.

Programming Languages

c
50402 projects - #5 most used programming language
assembly
5116 projects

Projects that are alternatives of or similar to los

Checkedc
Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, a…
Stars: ✭ 2,692 (+5752.17%)
Mutual labels:  llvm, clang
clangbuilder
Building Clang ♡ Utility and Environment
Stars: ✭ 101 (+119.57%)
Mutual labels:  llvm, clang
codebrowser
Woboq CodeBrowser
Stars: ✭ 985 (+2041.3%)
Mutual labels:  llvm, clang
Constexpr Everything
Rewrite C++ code to automatically apply `constexpr` where possible
Stars: ✭ 178 (+286.96%)
Mutual labels:  llvm, clang
dumb-obfuscator
Tutorial on how to write the dumbest obfuscator I could think of.
Stars: ✭ 147 (+219.57%)
Mutual labels:  llvm, clang
Clang Expand
🐉 A clang tool for happy refactoring without source-code gymnastics
Stars: ✭ 182 (+295.65%)
Mutual labels:  llvm, clang
linux
Linux kernel source tree
Stars: ✭ 234 (+408.7%)
Mutual labels:  llvm, clang
Play with llvm
A book about LLVM & Clang(中文开源书:玩转 LLVM)
Stars: ✭ 175 (+280.43%)
Mutual labels:  llvm, clang
MetaCG
MetaCG offers an annotated whole program call-graph tool for Clang/LLVM.
Stars: ✭ 21 (-54.35%)
Mutual labels:  llvm, clang
EmbedSanitizer
EmbedSantizer is a runtime race detection tool which extends ThreadSanitizer to detect data races in 32-bit ARM applications.
Stars: ✭ 16 (-65.22%)
Mutual labels:  llvm, clang
FPChecker
A dynamic analysis tool to detect floating-point errors in HPC applications.
Stars: ✭ 26 (-43.48%)
Mutual labels:  llvm, clang
sycl
SYCL for Vitis: Experimental fusion of triSYCL with Intel SYCL oneAPI DPC++ up-streaming effort into Clang/LLVM
Stars: ✭ 80 (+73.91%)
Mutual labels:  llvm, clang
Dstep
A tool for converting C and Objective-C headers to D modules
Stars: ✭ 177 (+284.78%)
Mutual labels:  llvm, clang
Cmake Scripts
A selection of useful scripts for use in CMake projects, include code coverage, sanitizers, and dependency graph generation.
Stars: ✭ 202 (+339.13%)
Mutual labels:  llvm, clang
Webassembly Examples
From Simple To Complex. A complete collection of webassembly examples.
Stars: ✭ 177 (+284.78%)
Mutual labels:  llvm, clang
TON-Compiler
Clang compiler for Free TON Virtual Machine
Stars: ✭ 56 (+21.74%)
Mutual labels:  llvm, clang
Clang Llvm Tutorial
clang & llvm examples, e.g. AST Interpreter, Function Pointer Analysis, Value Range Analysis, Data-Flow Analysis, Andersen Pointer Analysis, LLVM Backend...
Stars: ✭ 139 (+202.17%)
Mutual labels:  llvm, clang
Cling
The cling C++ interpreter
Stars: ✭ 2,322 (+4947.83%)
Mutual labels:  llvm, clang
vuo
A realtime visual programming language for interactive media.
Stars: ✭ 103 (+123.91%)
Mutual labels:  llvm, clang
flextool
C++ compile-time programming (serialization, reflection, code modification, enum to string, better enum, enum to json, extend or parse language, etc.)
Stars: ✭ 32 (-30.43%)
Mutual labels:  llvm, clang
English Language

los

简介
  1. Los是一个c/c++语言编译型的虚拟机。它使用llvm/clang作为其前端,losld做后端对源代码进行编译,生成los指令文件。Los虚拟机是100%c语言编写的,其可运行在mcu与pc上。 los(核心)占rom 8Kb左右(mini)。 los提供统一的api接口,实现一次编写,到处运行的好处,提高代码可重复使用率。 Author's mailbox:[email protected];QQ:708745662
  2. 具体请看
文件简介
│  favicon.ico
│  license-en.md
│  license.md
│  Makefile       -编译los.exe的makefile      
│  readme.md
│  
├─arch           -los提供统一的api接口的现实
│          
├─bin
│      as.exe        
│      clang.exe        -los编译器
│      los.exe          -los解释器
│      losld.exe        -los链接
│      losshell.exe     -los的shell
│      
├─eclipse-build-los     --编译.los可运行eclipse项目
│      
│─example                --los example
│      
├─inc                   -los提供统一的api接口的头文件
│      
├─lib                  -clang的库文件
│                  
├─los                  -los运行的配置文件
│      
├─los-mini                    -这文件是最小实现
│      los.c                  -los解释核心
│      los.h                  -los的头文件
│      main.c                 -los测试文件
│      test.c                 -los测试文件
├─los-code         
│      los.c                  -los解释核心
│      los_fat_config.c      -los的fat api
│      los_fat_config.h
│      los_t.h
│      
├─losfat                   -los的fat文件
│                  
├─mf-build-los-app         --编译.los可运行makefile项目
│      
└─test-file                -体验文件
        los.exe
        test_gpu.los

迷你版本(los-mini文件夹内)

运行说明
  1. 将bin文件添加到系统环境,进入los-mini文件夹内
  2. 执行clang编译:clang -c test.closld -o test test.o,生成test.los文件,将test.los文件转换为test[]数组
  3. 在los-mini文件夹下,输入make命令,生成los.exe文件。运行观看结果
api说明:

1.mini版本los,只有以下api:具体使用请看los.h文件内注释,以及参考test.c main.c

uint32_t los_quit(losc_t *lp);
void los_arg_clear(losc_t *lp);
uint32_t los_push_arg(losc_t *lp, uint32_t arg);
uint32_t los_call_addr(losc_t *lp, uint32_t addr);
void los_set_function(fun_os f);
uint32_t los_app_first(uint8_t *addr);

移植说明

  1. 需要把los.h的内存管理函数实现
#define lpram_malloc malloc
#define lpram_free free

运行过程

功能完善版本

运行说明
  1. 运行单个文件,请使用 xxx/los.exe xxx/xx.los的格式运行,或把los后缀的文件,拖到los.exe。
  2. 运行losfat中的文件可以直接双击los.exe,它会已losfat的文件作为跟目录
编译los.exe
  • 现提供1个方式
    1. 使用makefile
编译.los虚拟机可运行文件
  • 现提供2个方式-注意把bin文件夹加入系统变量
  1. 使用eclipse-build-los
  2. 在mf-build-los-app夹中使用使用make命令

移植说明

  1. 不需要管理app功能的,请使用los_app_frist函数作为入口。如los_app_frist("c://test/test.los"),运行rom或ram中的los文件,请使用如los_app_frist("c://test/test@123456") 123456是los在rom或ram中的地址

  2. 在arch文件中复制一份los_api文件夹,把各文件的api实现。

  3. los的库,在lib文件中

捐助支持

English Language

Introduction
  1. Los is a c/c++-compiled virtual machine. It uses llvm/clang as its front end, and losld does the backend to compile the source code to generate the los directive file. The Los virtual machine is written in 100% c language and runs on mcu and pc. Los (core) accounts for about rom 8Kb (mini). Los provides a unified API interface to achieve the benefits of writing once, running everywhere, and improving code reusability. Author's mailbox: [email protected].
  2. Specific Please See
Introduction to the file
│ favicon.ico
│ license-en.md
│ license.md
│ Makefile - compile los.exe makefile
│ readme.md
│
├─arch -los provides a unified api interface for reality
│
├─bin
│ as.exe
│ clang.exe -los compiler
│ los.exe -los interpreter
│ losld.exe -los link
│ losshell.exe -los shell
│
├─eclipse-build-los -- compile .los to run the eclipse project
│
├─inc -los provides a unified api interface header file
│
├─lib -clang library file
│
├─los -los running configuration file
│
├─los-mini - this file is the minimum implementation
│ los.c -los explains the core
│ los.h -los header file
│ main.c -los test file
│ test.c -los test file
├─los-code
│ los.c -los explains the core
│ los_fat_config.c -los fat api
│ los_fat_config.h
│ los_t.h
│
├─losfat-los fat file
│
├─mf-build-los-app -- compile .los to run the makefile project
│
└─test-file - experience file
        Los.exe
        Test_gpu.los

Mini version (in the los-mini folder)

Operation Instructions
  1. Add the bin file to the system environment and enter the los-mini folder.
  2. Execute clang compilation: clang -c test.c     With losld -o test test.o, generate the test.los file and convert the test.los file to the test[] array.
  3. In the los-mini folder, type the make command to generate the los.exe file. Run the viewing result
api Description:

1.mini version los, only the following api: please see the comments in the los.h file for specific use, and refer to test.c main.c

Uint32_t los_quit(losc_t *lp);
Void los_arg_clear(losc_t *lp);
Uint32_t los_push_arg(losc_t *lp, uint32_t arg);
Uint32_t los_call_addr(losc_t *lp, uint32_t addr);
Void los_set_function(fun_os f);
Uint32_t los_app_first(uint8_t *addr);

Migration Instructions

  1. Need to implement the memory management function of los.h
#define lpram_malloc malloc
#define lpram_free free

working process

Functionally perfect version

Operation Instructions
  1. To run a single file, run it in xxx/los.exe xxx/xx.los format, or drag the s suffixed file to los.exe.
  2. Run the file in losfat and you can double-click los.exe directly, it will be the losfat file as the directory
Compiling los.exe
  • 1 way available now    Use makefile
Compile the .los virtual machine to run the file

   * Now provide 2 ways - pay attention to add bin folder to system variables    1. Use eclipse-build-los    2. Use the make command in the mf-build-los-app folder

Migration Instructions

  1. If you don't need to manage the app function, please use the los_app_frist function as the entry. For example, los_app_frist("c://test/test.los"), run the los file in rom or ram, please use los_app_frist("c://test/test@123456") 123456 is los in rom or ram the address of

  2. Copy a los_api folder in the archive file and implement the api for each file.

  3. los library, in the lib file

Donation support
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].