re PR target/30987 (Problem while compiling gcc for score)
authorChen Liqin <liqin@sunnorth.com.cn>
Wed, 23 May 2007 06:09:20 +0000 (06:09 +0000)
committerChen Liqin <liqin@gcc.gnu.org>
Wed, 23 May 2007 06:09:20 +0000 (06:09 +0000)
2007-05-23  Chen Liqin  <liqin@sunnorth.com.cn>

PR target/30987
* config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
* config/score/predicate.md (const_pow2, const_npow2): remove.
* config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef.
PR target/30474
* config/score/score.c (score_print_operand): makes sure that only lower
        bits are used.

From-SVN: r124983

gcc/ChangeLog
gcc/config/score/misc.md
gcc/config/score/predicates.md
gcc/config/score/score.c
gcc/config/score/score.h

index ab1dc587a2ad6b3af5d4d2ddd69273114aab189a..52da89f144e56d26a708bb640d5bf815b71caa11 100644 (file)
@@ -1,3 +1,13 @@
+2007-05-23  Chen Liqin  <liqin@sunnorth.com.cn>
+
+       PR target/30987
+       * config/score/misc.md (bitclr_c, bitset_c, bittgl_c): remove.
+       * config/score/predicate.md (const_pow2, const_npow2): remove.
+       * config/score/score.h (ASM_OUTPUT_EXTERNAL): add ASM_OUTPUT_EXTERNAL undef.
+       PR target/30474
+       * config/score/score.c (score_print_operand): makes sure that only lower 
+        bits are used.
+       
 2007-05-22  Ian Lance Taylor  <iant@google.com>
 
        * tree-vrp.c (avoid_overflow_infinity): New static function,
index 5da7240c68731425fe0089aebc63f20c4b7740cb..b43497f08ed6fda742ab62aa53fae153bfce4d63 100644 (file)
   [(set_attr "type" "arith")
    (set_attr "mode" "SI")])
 
-(define_insn "bitclr_c"
-  [(set (match_operand:SI 0 "register_operand" "=e,d")
-        (and:SI (match_operand:SI 1 "register_operand" "0,d")
-                (match_operand:SI 2 "const_npow2")))
-   (clobber (reg:CC CC_REGNUM))]
-  ""
-  "@
-   bitclr!    %0, %F2
-   bitclr.c   %0, %1, %F2"
-  [(set_attr "type" "arith")
-   (set_attr "mode" "SI")])
-
-(define_insn "bitset_c"
-  [(set (match_operand:SI 0 "register_operand" "=e,d")
-        (ior:SI (match_operand:SI 1 "register_operand" "0,d")
-                (match_operand:SI 2 "const_pow2")))
-   (clobber (reg:CC CC_REGNUM))]
-  ""
-  "@
-   bitset!    %0, %E2
-   bitset.c   %0, %1, %E2"
-  [(set_attr "type" "arith")
-   (set_attr "mode" "SI")])
-
-(define_insn "bittgl_c"
-  [(set (match_operand:SI 0 "register_operand" "=e,d")
-        (xor:SI (match_operand:SI 1 "register_operand" "0,d")
-                (match_operand:SI 2 "const_pow2")))
-   (clobber (reg:CC CC_REGNUM))]
-  ""
-  "@
-   bittgl!    %0, %E2
-   bittgl.c   %0, %1, %E2"
-  [(set_attr "type" "arith")
-   (set_attr "mode" "SI")])
index eefb4971200da31208faac0bc6ad55aeca0238de..07c4b4358ece565a013f1d91190f2ab1611179fe 100644 (file)
   return IMM_IN_RANGE (INTVAL (op), 15, 1);
 })
 
-(define_predicate "const_pow2"
-  (match_code "const_int")
-{
-  return IMM_IS_POW_OF_2 ((unsigned HOST_WIDE_INT) INTVAL (op), 0, 31);
-})
-
-(define_predicate "const_npow2"
-  (match_code "const_int")
-{
-  return IMM_IS_POW_OF_2 (~(unsigned HOST_WIDE_INT) INTVAL (op), 0, 31);
-})
index 9fc179e15345d81398ed9dec7100d16bc2ae102e..2d6f721b23ba0cf30fdf992e7b44cf7406a0f9ca 100644 (file)
@@ -1167,7 +1167,7 @@ score_print_operand (FILE *file, rtx op, int c)
     {
       gcc_assert (code == CONST_INT);
       fprintf (file, HOST_WIDE_INT_PRINT_HEX,
-               (unsigned HOST_WIDE_INT) INTVAL (op) >> 16);
+               (INTVAL (op) >> 16) & 0xffff);
     }
   else if (c == 'D')
     {
@@ -1175,7 +1175,7 @@ score_print_operand (FILE *file, rtx op, int c)
         {
           rtx temp = gen_lowpart (SImode, op);
           gcc_assert (GET_MODE (op) == SFmode);
-          fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (temp));
+          fprintf (file, HOST_WIDE_INT_PRINT_HEX, INTVAL (temp) & 0xffffffff); 
         }
       else
         output_addr_const (file, op);
index eb3b4f5ecf9032fe9d2601ccdc1fe6be0b2f8d90..3d36a3805edf642dd5856b37d488aaf8be325d34 100644 (file)
@@ -785,6 +785,7 @@ typedef struct score_args
    output anything and let undefined symbol become external. However
    the assembler uses length information on externals to allocate in
    data/sdata bss/sbss, thereby saving exec time.  */
+#undef ASM_OUTPUT_EXTERNAL
 #define ASM_OUTPUT_EXTERNAL(STREAM, DECL, NAME) \
   score_output_external (STREAM, DECL, NAME)