+2003-12-15 Kazu Hirata <kazu@cs.umass.edu>
+
+ PR target/13122
+ * config/h8300/h8300.md (pushqi1_h8300hs_normal): New.
+ (pushqi1): Call gen_pushqi1_h8300hs_normal in normal mode.
+ (pushhi1_h8300hs_normal): New.
+ (pushhi1): Call gen_pushqi1_h8300hs_normal in normal mode.
+
+ * config/h8300/h8300.h (LINK_SPEC): Support normal mode.
+ * config/h8300/h8300.c (asm_file_start): Correctly output
+ an architecture directive.
+ * config/h8300/lib1funcs.asm: Correctly specify an
+ architecture directive.
+
2003-12-12 Roger Sayle <roger@eyesopen.com>
PR optimization/13037
else if (optimize)
fprintf (file, "; -O%d\n", optimize);
if (TARGET_H8300H)
- fprintf (file, "\n\t.h8300h\n");
+ fprintf (file, TARGET_NORMAL_MODE ? "\n\t.h8300hn\n" : "\n\t.h8300h\n");
else if (TARGET_H8300S)
- fprintf (file, "\n\t.h8300s\n");
+ fprintf (file, TARGET_NORMAL_MODE ? "\n\t.h8300sn\n" : "\n\t.h8300s\n");
else
fprintf (file, "\n\n");
output_file_directive (file, main_input_filename);
[(set_attr "length" "4")
(set_attr "cc" "clobber")])
+(define_insn "pushqi1_h8300hs_normal"
+ [(parallel [(set (reg:HI SP_REG)
+ (plus:HI (reg:HI SP_REG) (const_int -4)))
+ (set (mem:QI (plus:HI (reg:HI SP_REG) (const_int -3)))
+ (match_operand:QI 0 "register_operand" "r"))])]
+ "(TARGET_H8300H || TARGET_H8300S)
+ && operands[0] != stack_pointer_rtx"
+ "mov.l\\t%S0,@-er7"
+ [(set_attr "length" "4")
+ (set_attr "cc" "clobber")])
+
(define_expand "pushqi1"
[(use (match_operand:QI 0 "register_operand" ""))]
""
{
if (TARGET_H8300)
emit_insn (gen_pushqi1_h8300 (operands[0]));
- else
+ else if (!TARGET_NORMAL_MODE)
emit_insn (gen_pushqi1_h8300hs (operands[0]));
+ else
+ emit_insn (gen_pushqi1_h8300hs_normal (operands[0]));
DONE;
}")
[(set_attr "length" "4")
(set_attr "cc" "clobber")])
+(define_insn "pushhi1_h8300hs_normal"
+ [(parallel [(set (reg:HI SP_REG)
+ (plus:HI (reg:HI SP_REG) (const_int -4)))
+ (set (mem:HI (plus:HI (reg:HI SP_REG) (const_int -2)))
+ (match_operand:HI 0 "register_operand" "r"))])]
+ "(TARGET_H8300H || TARGET_H8300S)
+ && operands[0] != stack_pointer_rtx"
+ "mov.l\\t%S0,@-er7"
+ [(set_attr "length" "4")
+ (set_attr "cc" "clobber")])
+
(define_expand "pushhi1"
[(use (match_operand:HI 0 "register_operand" ""))]
""
{
if (TARGET_H8300)
emit_insn (gen_pushhi1_h8300 (operands[0]));
- else
+ else if (!TARGET_NORMAL_MODE)
emit_insn (gen_pushhi1_h8300hs (operands[0]));
+ else
+ emit_insn (gen_pushhi1_h8300hs_normal (operands[0]));
DONE;
}")