h8300.c (push): Call gen_push_h8300hs_advanced instead of gen_push_h8300hs.
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 4 Dec 2003 04:31:16 +0000 (04:31 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 4 Dec 2003 04:31:16 +0000 (04:31 +0000)
* config/h8300/h8300.c (push): Call gen_push_h8300hs_advanced
instead of gen_push_h8300hs.
(pop): Call gen_pop_h8300hs_advanced instead of
gen_pop_h8300hs.
* config/h8300/h8300.h (TRAMPOLINE_SIZE): Use Pmode.
* config/h8300/h8300.md (*tablejump_h8300hs_advanced):
Tighten the predicate.
(*tablejump_h8300hs_normal): Tighten the predicate.
(push_h8300hs): Change to
push_h8300hs_advanced.
(pop_h8300hs): Change to pop_h8300hs_advanced.

From-SVN: r74267

gcc/ChangeLog
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.h
gcc/config/h8300/h8300.md

index 738464f17230f0b52633ad9bfd260390c67c8216..e6d2e6d40f19d84f7c0f941992a5da66c28be999 100644 (file)
@@ -1,3 +1,17 @@
+2003-12-03  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (push): Call gen_push_h8300hs_advanced
+       instead of gen_push_h8300hs.
+       (pop): Call gen_pop_h8300hs_advanced instead of
+       gen_pop_h8300hs.
+       * config/h8300/h8300.h (TRAMPOLINE_SIZE): Use Pmode.
+       * config/h8300/h8300.md (*tablejump_h8300hs_advanced):
+       Tighten the predicate.
+       (*tablejump_h8300hs_normal): Tighten the predicate.
+       (push_h8300hs): Change to
+       push_h8300hs_advanced.
+       (pop_h8300hs): Change to pop_h8300hs_advanced.
+
 2003-12-03  Eric Christopher  <echristo@redhat.com>
 
        * rtl.c: Fix typo.
index f9754e415c444989e22ec32c70d7599fce47695f..ed3cc08c51d927f86be5e386a5f82e53879c8521 100644 (file)
@@ -435,7 +435,7 @@ push (int rn)
   if (TARGET_H8300)
     x = gen_push_h8300 (reg);
   else if (!TARGET_NORMAL_MODE)
-    x = gen_push_h8300hs (reg);
+    x = gen_push_h8300hs_advanced (reg);
   else
     x = gen_push_h8300hs_normal (reg);
   x = emit_insn (x);
@@ -453,7 +453,7 @@ pop (int rn)
   if (TARGET_H8300)
     x = gen_pop_h8300 (reg);
   else if (!TARGET_NORMAL_MODE)
-    x = gen_pop_h8300hs (reg);
+    x = gen_pop_h8300hs_advanced (reg);
   else
     x = gen_pop_h8300hs_normal (reg);
   x = emit_insn (x);
index c377b57c96b1d7d568a6b5271c81eb54f21d25f4..b60fc52af492daf137520ddd1496b5fbe5672152 100644 (file)
@@ -735,7 +735,7 @@ struct cum_arg
 
 /* Length in units of the trampoline for entering a nested function.  */
 
-#define TRAMPOLINE_SIZE ((TARGET_H8300 || TARGET_NORMAL_MODE) ? 8 : 12)
+#define TRAMPOLINE_SIZE ((Pmode == HImode) ? 8 : 12)
 
 /* Emit RTL insns to build a trampoline.
    FNADDR is an RTX for the address of the function's pure code.
index 5a9d6ad50791b5edeb812ba62b4fae0712a731fb..974330847ec21fb76a024f8694e4ede11ce21adc 100644 (file)
 (define_insn "*tablejump_h8300hs_advanced"
   [(set (pc) (match_operand:SI 0 "register_operand" "r"))
    (use (label_ref (match_operand 1 "" "")))]
-  "TARGET_H8300H || TARGET_H8300S"
+  "(TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE"
   "jmp @%0"
   [(set_attr "cc" "none")
    (set_attr "length" "2")])
 
 (define_insn "*indirect_jump_h8300hs_advanced"
   [(set (pc) (match_operand:SI 0 "jump_address_operand" "Vr"))]
-  "TARGET_H8300H || TARGET_H8300S"
+  "(TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE"
   "jmp @%0"
   [(set_attr "cc" "none")
    (set_attr "length" "2")])
   "TARGET_H8300"
   "")
 
-(define_expand "push_h8300hs"
+(define_expand "push_h8300hs_advanced"
   [(set (mem:SI (pre_dec:SI (reg:SI SP_REG)))
         (match_operand:SI 0 "register_operand" ""))]
-  "TARGET_H8300H && TARGET_H8300S"
+  "TARGET_H8300H && TARGET_H8300S && !TARGET_NORMAL_MODE"
   "")
 
 (define_expand "push_h8300hs_normal"
   [(set (mem:SI (pre_dec:HI (reg:HI SP_REG)))
         (match_operand:SI 0 "register_operand" ""))]
-  "TARGET_NORMAL_MODE"
+  "TARGET_H8300H && TARGET_H8300S && TARGET_NORMAL_MODE"
   "")
 
 (define_expand "pop_h8300"
   "TARGET_H8300"
   "")
 
-(define_expand "pop_h8300hs"
+(define_expand "pop_h8300hs_advanced"
   [(set (match_operand:SI 0 "register_operand" "")
        (mem:SI (post_inc:SI (reg:SI SP_REG))))]
-  "TARGET_H8300H && TARGET_H8300S"
+  "TARGET_H8300H && TARGET_H8300S && !TARGET_NORMAL_MODE"
   "")
 
 (define_expand "pop_h8300hs_normal"
   [(set (match_operand:SI 0 "register_operand" "")
        (mem:SI (post_inc:HI (reg:HI SP_REG))))]
-  "TARGET_NORMAL_MODE"
+  "TARGET_H8300H && TARGET_H8300S && TARGET_NORMAL_MODE"
   "")
 
 (define_insn "stm_h8300s_2_advanced"