Mercurial > hg > CbC > CbC_gcc
diff gcc/config/m32c/addsub.md @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
line wrap: on
line diff
--- a/gcc/config/m32c/addsub.md Tue May 25 18:58:51 2010 +0900 +++ b/gcc/config/m32c/addsub.md Tue Mar 22 17:18:12 2011 +0900 @@ -1,5 +1,5 @@ ;; Machine Descriptions for R8C/M16C/M32C -;; Copyright (C) 2005, 2007 +;; Copyright (C) 2005, 2007, 2010 ;; Free Software Foundation, Inc. ;; Contributed by Red Hat. ;; @@ -93,9 +93,17 @@ case 1: return \"add.w %X2,%h0\;adcf.w %H0\"; case 2: - output_asm_insn (\"add.w %X2,%h0\",operands); - operands[2]= GEN_INT (INTVAL (operands[2]) >> 16); - return \"adc.w %X2,%H0\"; + if (GET_CODE (operands[2]) == SYMBOL_REF) + { + output_asm_insn (\"add.w #%%lo(%d2),%h0\",operands); + return \"adc.w #%%hi(%d2),%H0\"; + } + else + { + output_asm_insn (\"add.w %X2,%h0\",operands); + operands[2]= GEN_INT (INTVAL (operands[2]) >> 16); + return \"adc.w %X2,%H0\"; + } case 3: return \"add.w %h2,%h0\;adc.w %H2,%H0\"; case 4: @@ -108,6 +116,8 @@ return \"add.w %h2,%h0\;adc.w %H2,%H0\"; case 7: return \"add.w %h2,%h0\;adc.w %H2,%H0\"; + default: + gcc_unreachable (); }" [(set_attr "flags" "x,x,x,x,x,x,x,x")] ) @@ -192,6 +202,8 @@ return \"sub.w %h2,%h0\;sbb.w %H2,%H0\"; case 5: return \"sub.w %h2,%h0\;sbb.w %H2,%H0\"; + default: + gcc_unreachable (); }" [(set_attr "flags" "x,x,x,x,x,x")] )