diff mbox

The nvptx port [6/11+] Pseudo call args

Message ID 54451BA5.7070007@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Oct. 20, 2014, 2:26 p.m. UTC
On ptx, we'll be using pseudos to pass function args as well, and 
there's one assert that needs to be toned town to make that work.


Bernd

Comments

Jeff Law Oct. 21, 2014, 6:44 p.m. UTC | #1
On 10/20/14 14:26, Bernd Schmidt wrote:
> On ptx, we'll be using pseudos to pass function args as well, and
> there's one assert that needs to be toned town to make that work.
>
>
> Bernd
>
>
> 006-usereg.diff
>
>
> 	gcc/
> 	* expr.c (use_reg_mode): Just return for pseudo registers.
OK.

I pondered asking for this to be conditional on the 
no-register-allocation conditional, but then  decided it wasn't worth 
the effort.

jeff
diff mbox

Patch

	gcc/
	* expr.c (use_reg_mode): Just return for pseudo registers.

------------------------------------------------------------------------
Index: gcc/expr.c
===================================================================
--- gcc/expr.c	(revision 422421)
+++ gcc/expr.c	(revision 422422)
@@ -2321,7 +2321,10 @@  copy_blkmode_to_reg (enum machine_mode m
 void
 use_reg_mode (rtx *call_fusage, rtx reg, enum machine_mode mode)
 {
-  gcc_assert (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER);
+  gcc_assert (REG_P (reg));
+
+  if (!HARD_REGISTER_P (reg))
+    return;
 
   *call_fusage
     = gen_rtx_EXPR_LIST (mode, gen_rtx_USE (VOIDmode, reg), *call_fusage);