diff options
Diffstat (limited to 'gcc/config/s390')
-rw-r--r-- | gcc/config/s390/linux-unwind.h | 10 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 8 | ||||
-rw-r--r-- | gcc/config/s390/s390.h | 20 | ||||
-rw-r--r-- | gcc/config/s390/s390.md | 54 |
4 files changed, 51 insertions, 41 deletions
diff --git a/gcc/config/s390/linux-unwind.h b/gcc/config/s390/linux-unwind.h index 3713f1821a9..088afb71820 100644 --- a/gcc/config/s390/linux-unwind.h +++ b/gcc/config/s390/linux-unwind.h @@ -1,5 +1,5 @@ /* DWARF2 EH unwinding support for S/390 Linux. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 Free Software Foundation, Inc. This file is part of GCC. @@ -8,6 +8,14 @@ the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. +In addition to the permissions in the GNU General Public License, the +Free Software Foundation gives you unlimited permission to link the +compiled version of this file with other programs, and to distribute +those programs without any restriction coming from the use of this +file. (The General Public License restrictions do apply in other +respects; for example, they cover modification of the file, and +distribution when not linked into another program.) + GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index f9be9cf0a6f..a5896e878d2 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5437,7 +5437,7 @@ s390_alloc_pool (void) pool->label = gen_label_rtx (); pool->first_insn = NULL_RTX; pool->pool_insn = NULL_RTX; - pool->insns = BITMAP_XMALLOC (); + pool->insns = BITMAP_ALLOC (NULL); pool->size = 0; return pool; @@ -5464,7 +5464,7 @@ s390_free_pool (struct constant_pool *pool) free (c); } - BITMAP_XFREE (pool->insns); + BITMAP_FREE (pool->insns); free (pool); } @@ -5821,7 +5821,7 @@ s390_chunkify_start (void) /* Find all labels that are branched into from an insn belonging to a different chunk. */ - far_labels = BITMAP_XMALLOC (); + far_labels = BITMAP_ALLOC (NULL); for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) { @@ -5918,7 +5918,7 @@ s390_chunkify_start (void) } - BITMAP_XFREE (far_labels); + BITMAP_FREE (far_labels); /* Recompute insn addresses. */ diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 9a80e818ae9..a6b7a3afd51 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -612,20 +612,22 @@ extern int current_function_outgoing_args_size; the argument area. */ #define FIRST_PARM_OFFSET(FNDECL) 0 +/* Defining this macro makes __builtin_frame_address(0) and + __builtin_return_address(0) work with -fomit-frame-pointer. */ +#define INITIAL_FRAME_ADDRESS_RTX \ + (TARGET_PACKED_STACK ? \ + plus_constant (arg_pointer_rtx, -UNITS_PER_WORD) : \ + plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET)) + /* The return address of the current frame is retrieved from the initial value of register RETURN_REGNUM. For frames farther back, we use the stack slot where the corresponding RETURN_REGNUM register was saved. */ +#define DYNAMIC_CHAIN_ADDRESS(FRAME) \ + (TARGET_PACKED_STACK ? \ + plus_constant ((FRAME), STACK_POINTER_OFFSET - UNITS_PER_WORD) : (FRAME)) -#define DYNAMIC_CHAIN_ADDRESS(FRAME) \ - (TARGET_PACKED_STACK ? \ - ((FRAME) != hard_frame_pointer_rtx ? \ - plus_constant ((FRAME), STACK_POINTER_OFFSET - UNITS_PER_WORD) : \ - plus_constant (arg_pointer_rtx, -UNITS_PER_WORD)) : \ - ((FRAME) != hard_frame_pointer_rtx ? (FRAME) : \ - plus_constant (arg_pointer_rtx, -STACK_POINTER_OFFSET))) - -#define RETURN_ADDR_RTX(COUNT, FRAME) \ +#define RETURN_ADDR_RTX(COUNT, FRAME) \ s390_return_addr_rtx ((COUNT), DYNAMIC_CHAIN_ADDRESS ((FRAME))) /* In 31-bit mode, we need to mask off the high bit of return addresses. */ diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 4b8b58ad45c..a0b9a3143a0 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -514,7 +514,7 @@ "s390_match_ccmode (insn, CCTmode) && TARGET_64BIT" "@ cgr\t%0,%1 - cghi\t%0,%c1 + cghi\t%0,%h1 cg\t%0,%1 #" [(set_attr "op_type" "RRE,RI,RXY,SS")]) @@ -526,7 +526,7 @@ "s390_match_ccmode (insn, CCTmode)" "@ cr\t%0,%1 - chi\t%0,%c1 + chi\t%0,%h1 c\t%0,%1 cy\t%0,%1 #" @@ -552,7 +552,7 @@ "s390_match_ccmode(insn, CCSmode) && TARGET_64BIT" "@ cgr\t%0,%1 - cghi\t%0,%c1 + cghi\t%0,%h1 cg\t%0,%1" [(set_attr "op_type" "RRE,RI,RXY")]) @@ -573,7 +573,7 @@ "s390_match_ccmode(insn, CCSmode)" "@ cr\t%0,%1 - chi\t%0,%c1 + chi\t%0,%h1 c\t%0,%1 cy\t%0,%1" [(set_attr "op_type" "RR,RI,RX,RXY")]) @@ -2660,6 +2660,27 @@ ; LLGT-type instructions (zero-extend from 31 bit to 64 bit). ; +(define_insn "*llgt_sidi" + [(set (match_operand:DI 0 "register_operand" "=d") + (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0) + (const_int 2147483647)))] + "TARGET_64BIT" + "llgt\t%0,%1" + [(set_attr "op_type" "RXE")]) + +(define_insn_and_split "*llgt_sidi_split" + [(set (match_operand:DI 0 "register_operand" "=d") + (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0) + (const_int 2147483647))) + (clobber (reg:CC 33))] + "TARGET_64BIT" + "#" + "&& reload_completed" + [(set (match_dup 0) + (and:DI (subreg:DI (match_dup 1) 0) + (const_int 2147483647)))] + "") + (define_insn "*llgt_sisi" [(set (match_operand:SI 0 "register_operand" "=d,d") (and:SI (match_operand:SI 1 "nonimmediate_operand" "d,m") @@ -2702,27 +2723,6 @@ (const_int 2147483647)))] "") -(define_insn "*llgt_sidi" - [(set (match_operand:DI 0 "register_operand" "=d") - (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0) - (const_int 2147483647)))] - "TARGET_64BIT" - "llgt\t%0,%1" - [(set_attr "op_type" "RXE")]) - -(define_insn_and_split "*llgt_sidi_split" - [(set (match_operand:DI 0 "register_operand" "=d") - (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0) - (const_int 2147483647))) - (clobber (reg:CC 33))] - "TARGET_64BIT" - "#" - "&& reload_completed" - [(set (match_dup 0) - (and:DI (subreg:DI (match_dup 1) 0) - (const_int 2147483647)))] - "") - ; ; zero_extendqidi2 instruction pattern(s) ; @@ -2776,7 +2776,7 @@ (define_insn "*zero_extendhisi2_64" [(set (match_operand:SI 0 "register_operand" "=d") (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))] - "TARGET_64BIT" + "TARGET_ZARCH" "llgh\t%0,%1" [(set_attr "op_type" "RXY")]) @@ -2784,7 +2784,7 @@ [(set (match_operand:SI 0 "register_operand" "=&d") (zero_extend:SI (match_operand:HI 1 "s_operand" "QS"))) (clobber (reg:CC 33))] - "!TARGET_64BIT" + "!TARGET_ZARCH" "#" "&& reload_completed" [(set (match_dup 0) (const_int 0)) |