From 1c3651a81bc17ac6bb78d22d84b0b92b48d929ae Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Fri, 20 Apr 2012 01:25:01 +0200 Subject: [PATCH] fix parameter passing for booleans --- gcc/gcc/config/m68k/m68k.h | 3 +++ gcc/gcc/config/m68k/m68k.md | 24 +++++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/gcc/gcc/config/m68k/m68k.h b/gcc/gcc/config/m68k/m68k.h index 1f3bf3355c..69626486c1 100644 --- a/gcc/gcc/config/m68k/m68k.h +++ b/gcc/gcc/config/m68k/m68k.h @@ -309,6 +309,9 @@ along with GCC; see the file COPYING3. If not see #define PREFERRED_STACK_BOUNDARY \ ((TARGET_COLDFIRE || TARGET_FIDOA) ? 32 : 16) +#define FUNCTION_ARG_PADDING(MODE, TYPE) upward + + /* No data type wants to be aligned rounder than this. Most published ABIs say that ints should be aligned on 16-bit boundaries, but CPUs with 32-bit busses get better performance diff --git a/gcc/gcc/config/m68k/m68k.md b/gcc/gcc/config/m68k/m68k.md index 7d3adef6a0..cb7f745e6e 100644 --- a/gcc/gcc/config/m68k/m68k.md +++ b/gcc/gcc/config/m68k/m68k.md @@ -1110,12 +1110,26 @@ move%.b %1,%0" [(set_attr "type" "clr,clr,move,move")]) -(define_expand "pushqi1" - [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -2))) - (set (mem:QI (plus:SI (reg:SI SP_REG) (const_int 1))) - (match_operand:QI 0 "general_operand" ""))] +; (define_expand "pushqi1" +; [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -2))) +; (set (mem:QI (reg:SI SP_REG) ) +; (match_operand:QI 0 "general_operand" ""))] +; "!TARGET_COLDFIRE" +; "") + +; (define_insn "*pushqi1" +; [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -2))) +; (set (mem:QI (reg:SI SP_REG) ) +; (match_operand:QI 0 "general_operand" ""))] +; "!TARGET_COLDFIRE" +; { return "move%.b %0,%-"; }) + +(define_insn "*pushqi1" + [ + (set (mem:QI (pre_modify:SI (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int -2)))) + (match_operand:QI 0 "general_operand" "dmn"))] "!TARGET_COLDFIRE" - "") + { return "move%.b %0,%-"; }) (define_expand "reload_insf" [(set (match_operand:SF 0 "nonimmediate_operand" "=f")