This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: m32c: Adjust modeling of ENTER instruction


The patch below fixes the modeling of the m32c ENTER instruction so
that it matches the documented behavior.

Okay?

	* config/m32c/prologue.md (prologue_enter_16): Set FB to SP - 2.
	(prologue_enter_32): Set FB to SP - 4.

Index: config/m32c/prologue.md
===================================================================
--- config/m32c/prologue.md	(revision 141693)
+++ config/m32c/prologue.md	(working copy)
@@ -35,7 +35,7 @@
   [(set (mem:HI (plus:HI (reg:HI SP_REGNO) (const_int -2)))
 	(reg:HI FB_REGNO))
    (set (reg:HI FB_REGNO)
-	(reg:HI SP_REGNO))
+	(plus:HI (reg:HI SP_REGNO) (const_int -2)))
    (set (reg:HI SP_REGNO)
 	(minus:HI (reg:HI SP_REGNO)
 	           (match_operand 0 "const_int_operand" "i")))
@@ -54,7 +54,7 @@
   [(set (mem:SI (plus:PSI (reg:PSI SP_REGNO) (const_int -4)))
 	(reg:SI FB_REGNO))
    (set (reg:PSI FB_REGNO)
-	(reg:PSI SP_REGNO))
+	(plus:PSI (reg:PSI SP_REGNO) (const_int -4)))
    (set (reg:PSI SP_REGNO)
 	(minus:PSI (reg:PSI SP_REGNO)
 	           (match_operand 0 "const_int_operand" "i")))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]