GCC源代码分析,recog_memoized()函数
来源:互联网 发布:怎样登录淘宝网页版 编辑:程序博客网 时间:2024/05/24 07:24
定义在recog.c文件中
int
recog_memoized (insn)rtx insn;
{
volatile_ok = 1;
if (INSN_CODE (insn) < 0)
INSN_CODE (insn) = recog (PATTERN (insn), insn);
return INSN_CODE (insn);
}
recog()函数定义在insn_recog.c文件中
...
insn insn 13
insn call_insn 140
insn insn 14
insn jump_insn 137
(const_int 4)
(reg:SI 6)
(plus:SI (reg:SI 6)
(const_int 4))
(mem:SI (plus:SI (reg:SI 6)
(const_int 4)))
(reg:SI 6)
(reg:SI 6)
(plus:SI (reg:SI 6)
(reg:SI 6))
(const_int 4)
(plus:SI (plus:SI (reg:SI 6)
(reg:SI 6))
(const_int 4))
insn insn 13
insn call_insn 140
insn insn 14
insn jump_insn 137
(mem (nil))
insn insn 13
insn insn 13
insn call_insn 140
insn call_insn 140
insn insn 14
insn insn 14
insn jump_insn 137
insn jump_insn 137
最终得到的号码是140
insn call_insn 140
i=0 reg
i=1 mem
i=2 const_int
operands[0]名字是reg, operands[1]名字是mem, operands[2]名字是const_int
static char *
output_140 (operands, insn)
rtx *operands;
rtx insn;
{
{
if (GET_CODE (operands[1]) == MEM
&& ! CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
{
operands[1] = XEXP (operands[1], 0);
output_asm_insn ("call %*%1", operands);
}
else
output_asm_insn ("call %1", operands);
if (GET_MODE (operands[0]) == DFmode
|| GET_MODE (operands[0]) == SFmode)
{
/* fp_pop_level++; */
/* pop if reg dead */
if (!FP_REG_P (operands[0]))
abort ();
if (top_dead_p (insn))
{
POP_ONE_FP;
}
}
RET;
}
Out-i386.c (config):29
#define RET return ""
这里的RET的目的是第二次进入output_asm_insn()函数的时候直接返回,因为
/* An insn may return a null string template
in a case where no assembler code is needed. */
if (*template == 0)
return;
Tm-i386.h (config):653
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
rtl.h
#define CONSTANT_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT \
|| GET_CODE (X) == CONST)
- GCC源代码分析,recog_memoized()函数
- gcc源代码分析 gen_rtx()函数
- gcc源代码分析emit_call_insn()函数
- gcc源代码分析,output_asm_insn()函数
- gcc源代码分析,expand_expr_stmt()函数
- gcc源代码分析,rtx_alloc函数分析
- gcc源代码分析,build_string ()函数分析
- gcc源代码分析,build_function_call ()函数分析
- gcc源代码分析,build_pointer_type ()函数分析
- gcc源代码分析,actualparameterlist ()函数分析
- gcc源代码分析,default_conversion ()函数分析
- gcc源代码分析,get_parm_info ()函数分析
- gcc源代码分析,grokdeclarator()函数分析
- gcc源代码分析,grokparms ()函数分析
- gcc源代码分析之gen_call_value()函数
- gcc源代码分析,debug_rtx()函数,利器啊
- gcc源代码分析,debug_tree()函数的利用
- gcc源代码分析,expand_call()函数第三部分
- 在eclipse中查看Android源代码
- NOI 国家集训队论文集
- Peter's Smokes
- 架构设计之分布式缓存
- solr运行配置与数据库数据导入到solr
- GCC源代码分析,recog_memoized()函数
- Apache Solrj学习
- 如何删除tomcat下的一目
- spring学习笔记1
- JBoss 系列八十六: JBoss Modules module.xml 中 export="true" 是什么意思
- 2013年软件设计师考试知识体系
- C语言随机分组
- gdb回溯调试
- 中小企业网管管理完全篇