On 2012/10/12 06:55 AM, Oleg Endo wrote: > This broke the recently added thread pointer built-ins on SH, but I was > prepared for that, so no problem here. The attached patch is a straight > forward fix. > > However, with the patch applied I get an ICE on one of the SH thread > pointer tests: gcc/testsuite/gcc.target/sh/pr54760-3.c, function > test04: > > internal compiler error: in expand_insn, at optabs.c:8208 > __builtin_set_thread_pointer (xx[i]);
Looks like I was supposed to use create_input_operand() there instead. I've committed the attached patch as obvious. This should be fixed now. Thanks, Chung-Lin * builtins.c (expand_builtin_set_thread_pointer): Use create_input_operand() instead of create_fixed_operand().
Index: builtins.c =================================================================== --- builtins.c (revision 192421) +++ builtins.c (revision 192422) @@ -5776,7 +5776,7 @@ struct expand_operand op; rtx val = expand_expr (CALL_EXPR_ARG (exp, 0), NULL_RTX, Pmode, EXPAND_NORMAL); - create_fixed_operand (&op, val); + create_input_operand (&op, val, Pmode); expand_insn (icode, 1, &op); return; }