Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-26173-2487151
sysy-compiler-1811
Commits
e2a6783e
Commit
e2a6783e
authored
10 months ago
by
guangxing
Browse files
Options
Download
Patches
Plain Diff
doc for backend
parent
33be7d3b
main
submit0820
submit6
zzh-callsite-dev1
zzh-pure-mem-dev
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
设计分析文档_1.md
+5
-5
设计分析文档_1.md
with
5 additions
and
5 deletions
+5
-5
设计分析文档_1.md
+
5
−
5
View file @
e2a6783e
...
...
@@ -64,9 +64,9 @@ AST 的主要类:`Node`(所有 AST 节点的基类)、`Stmt`(语句,
## 2.4 后端
### 指令选择
###
2.4.1
指令选择
#TODO
在后端架构中,我们使用了和IR阶段类似的数据结构储存所有的riscv指令,以便完成指令选择和后续的算法,指令选择完全参考riscvcard,根据传入的IR语句类型进行一对多的指令替换,可以处理所有的立即数和浮点数运算情况,并可以正确处理跳转逻辑,所有跳转均使用J指令完成。
### 寄存器分配
...
...
@@ -74,15 +74,15 @@ AST 的主要类:`Node`(所有 AST 节点的基类)、`Stmt`(语句,
### 栈分配
#TODO 栈
空间
的
利用
栈分配
空间利用
设计的stackframe结构体储存,在栈帧的存取操作中,通过读取和修改stackframe中的数据完成。
### 函数调用
#TODO 函数传参、程序现场保存和
恢复
函数的调用和保护现场采用最保守的策略,调用前后完整保护现场,并在调用结束后立刻
恢复
。
### 窥孔优化
#TODO
最后完成窥孔优化,简化函数传参和数组取地址的运算逻辑,并去除冗余的部分指令。
# 4. 环境配置
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets