gcc mailing list 发问题没反应
gcc mailing list 发问题没反应 一般要怎么用 可以ping一下。或者直接去irc里问问。 没办法。发帖子没人回是常事 @_@ 先这里问问我要将一条rtl变成两条rtl,要怎么写define_expand
store 123,
(set (mem:SI (symbol_ref:SI "abcd")) (const_int 123))
move reg , abcd
store 123 , 首先,define_expand只能用于标准名字,“A define_expand is an RTL expression that looks almost like a define_insn; but, unlike the latter, a define_expand is used only for RTL generation and it can produce more than one RTL insn. ”。
看起来,你这个是一个move操作,所以需要定义mov的define_expand,具体的实现,可以先参考下现有gcc中的代码。 非常感谢!我先去看资料 用下面的代码,没效果。(define_expand "movsi_symbol_ref" [(set (mem:SI (match_operand:SI 0 "address_operand")) (match_operand:SI 1 "general_operand"))] ""
"
{
rtx symbol;
symbol = copy_to_reg (operands);
emit_move_insn (operands, symbol);
operands = symbol;
DONE;
}"
)
恩,我说过,define_expand只用于标准名字。movsi_symbol_ref不是标准名字吧,参见http://gcc.gnu.org/onlinedocs/gccint/Standard-Names.html#Standard-Names。 我再试试,其它后端也有非标准名字的define_expand
页:
[1]