Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nzh63/syc
Optimizing compiler for SysY (C subset)
https://github.com/nzh63/syc
Last synced: 1 day ago
JSON representation
Optimizing compiler for SysY (C subset)
- Host: GitHub
- URL: https://github.com/nzh63/syc
- Owner: nzh63
- License: gpl-3.0
- Created: 2020-08-23T10:43:34.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-14T13:26:49.000Z (7 months ago)
- Last Synced: 2024-08-02T07:02:04.076Z (3 months ago)
- Language: C++
- Homepage: https://nzh63.github.io/syc/
- Size: 4.33 MB
- Stars: 39
- Watchers: 2
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ARMv7a上的SysY编译器
## Try it in your browser
Syc works with browsers that support WebAssembly. Click [here](https://nzh63.github.io/syc/) to it out.
## Build
```bash
mkdir build
cd build
cmake ..
make
```## Usage
```
syc [options] fileOPTIONS:
-o Place the output into .
-O Set optimization level to .
-g Produce debugging information in DWARF2 format.
-yydebug Enable debug of yacc parsers.
-print_ast Print the AST to stderr.
-print_ir Print the IR to stderr.
-print_log Print logs to assembly comment.```
## Test
1. Install [node.js](https://nodejs.org), `arm-linux-gnueabihf-gcc` and`qemu-arm` .
2. `cd build && make test`## IR操作数符号说明
|符号| 说明 |
|----|------------------------|
| % | 局部符号 |
| @ | 全局符号 |
| & | 数组 |
| ^ |导出符号(不进行重命名)|