Commit 5af2f3d3 by Ulrich Weigand Committed by Ulrich Weigand

s390.c (struct machine_function): Remove member literal_pool_label.

	* config/s390/s390.c (struct machine_function): Remove member
	literal_pool_label.
	(s390_optimize_prolog): Replace TEMP_REG argument with
	TEMP_USED and BASE_USED.  Do not check get_pool_size ().
	(general_s_operand): Accept all immediates before reload if
	ALLOW_IMMEDIATE.  If not ALLOW_IMMEDIATE, reject literal pool
	references.
	(s390_output_symbolic_const): Remove UNSPEC_LTREL_OFFSET handling.
	(find_constant_pool_ref): Ignore UNSPECV_POOL_ENTRY insns.
	(s390_alloc_pool): New function.
	(s390_new_pool): Call it.
	(s390_dump_pool): Add REMOTE_LABEL argument.
	(s390_chunkify_start): Add BASE_REG argument.  Do not check
	get_pool_size ().
	(s390_chunkify_finish): Add BASE_REG argument.  Adapt
	s390_dump_pool call.
	(s390_pool_count, s390_nr_constants): Remove.
	(s390_output_constant_pool): Remove.
	(s390_mainpool_start): New function.
	(s390_mainpool_finish): New function.
	(s390_mainpool_cancel): New function.
	(s390_reorg): Implement main literal pool handling.
	(s390_emit_prologue): Emit main_pool placeholder instead of
	literal_pool_31 / literal_pool_64 insns.
	* config/s390/s390.h (s390_pool_count, s390_nr_constants): Remove.
	(ASM_OUTPUT_POOL_PROLOGUE, ASM_OUTPUT_SPECIAL_POOL_ENTRY): Remove.
	* config/s390/s390.md (UNSPEC_MAIN_BASE): New symbolic constant.
	("main_base_31_small", "main_base_31_large"): New insns.
	("main_base_64",  "main_pool"): New insns.
	("literal_pool_31", "literal_pool_64"): Remove.

From-SVN: r70853
parent 031b59ce
2003-08-27 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.c (struct machine_function): Remove member
literal_pool_label.
(s390_optimize_prolog): Replace TEMP_REG argument with
TEMP_USED and BASE_USED. Do not check get_pool_size ().
(general_s_operand): Accept all immediates before reload if
ALLOW_IMMEDIATE. If not ALLOW_IMMEDIATE, reject literal pool
references.
(s390_output_symbolic_const): Remove UNSPEC_LTREL_OFFSET handling.
(find_constant_pool_ref): Ignore UNSPECV_POOL_ENTRY insns.
(s390_alloc_pool): New function.
(s390_new_pool): Call it.
(s390_dump_pool): Add REMOTE_LABEL argument.
(s390_chunkify_start): Add BASE_REG argument. Do not check
get_pool_size ().
(s390_chunkify_finish): Add BASE_REG argument. Adapt
s390_dump_pool call.
(s390_pool_count, s390_nr_constants): Remove.
(s390_output_constant_pool): Remove.
(s390_mainpool_start): New function.
(s390_mainpool_finish): New function.
(s390_mainpool_cancel): New function.
(s390_reorg): Implement main literal pool handling.
(s390_emit_prologue): Emit main_pool placeholder instead of
literal_pool_31 / literal_pool_64 insns.
* config/s390/s390.h (s390_pool_count, s390_nr_constants): Remove.
(ASM_OUTPUT_POOL_PROLOGUE, ASM_OUTPUT_SPECIAL_POOL_ENTRY): Remove.
* config/s390/s390.md (UNSPEC_MAIN_BASE): New symbolic constant.
("main_base_31_small", "main_base_31_large"): New insns.
("main_base_64", "main_pool"): New insns.
("literal_pool_31", "literal_pool_64"): Remove.
2003-08-27 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/inclhack.def (ptx_netswap): New disabled fix, ported from
......
......@@ -1012,35 +1012,6 @@ do { \
} while (0)
/* Constant Pool for all symbols operands which are changed with
force_const_mem during insn generation (expand_insn). */
extern int s390_pool_count;
extern int s390_nr_constants;
#define ASM_OUTPUT_POOL_PROLOGUE(FILE, FUNNAME, fndecl, size) \
{ \
struct pool_constant *pool; \
\
if (s390_pool_count == -1) \
{ \
s390_nr_constants = 0; \
for (pool = first_pool; pool; pool = pool->next) \
if (pool->mark) s390_nr_constants++; \
return; \
} \
}
#define ASM_OUTPUT_SPECIAL_POOL_ENTRY(FILE, EXP, MODE, ALIGN, LABELNO, WIN) \
{ \
fprintf (FILE, ".LC%d:\n", LABELNO); \
s390_output_pool_entry (FILE, EXP, MODE, ALIGN); \
if (GET_MODE_SIZE (MODE) == 1) \
ASM_OUTPUT_SKIP ((FILE), (unsigned HOST_WIDE_INT)1); \
goto WIN; \
}
/* Miscellaneous parameters. */
/* Define the codes that are matched by predicates in aux-output.c. */
......
......@@ -65,6 +65,7 @@
; Literal pool
(UNSPEC_RELOAD_BASE 210)
(UNSPEC_MAIN_BASE 211)
; TLS relocation specifiers
(UNSPEC_TLSGD 500)
......@@ -7232,6 +7233,36 @@
[(set_attr "op_type" "NN")
(set_attr "length" "0")])
(define_insn "main_base_31_small"
[(set (match_operand:SI 0 "register_operand" "=a")
(unspec:SI [(label_ref (match_operand 1 "" ""))] UNSPEC_MAIN_BASE))]
"!TARGET_64BIT"
"basr\t%0,0"
[(set_attr "op_type" "RR")
(set_attr "type" "la")])
(define_insn "main_base_31_large"
[(set (match_operand:SI 0 "register_operand" "=a")
(unspec:SI [(label_ref (match_operand 1 "" ""))] UNSPEC_MAIN_BASE))
(set (pc) (label_ref (match_operand 2 "" "")))]
"!TARGET_64BIT"
"bras\t%0,%2"
[(set_attr "op_type" "RI")])
(define_insn "main_base_64"
[(set (match_operand:DI 0 "register_operand" "=a")
(unspec:DI [(label_ref (match_operand 1 "" ""))] UNSPEC_MAIN_BASE))]
"TARGET_64BIT"
"larl\t%0,%1"
[(set_attr "op_type" "RIL")
(set_attr "type" "larl")])
(define_insn "main_pool"
[(unspec_volatile [(const_int 0)] UNSPECV_MAIN_POOL)]
""
"* abort ();"
[(set_attr "op_type" "NN")])
(define_insn "reload_base_31"
[(set (match_operand:SI 0 "register_operand" "=a")
(unspec:SI [(label_ref (match_operand 1 "" ""))] UNSPEC_RELOAD_BASE))]
......@@ -7290,42 +7321,6 @@
(set_attr "type" "jsr")
(set_attr "atype" "agen")])
(define_insn "literal_pool_31"
[(unspec_volatile [(const_int 0)] UNSPECV_MAIN_POOL)
(set (match_operand:SI 0 "register_operand" "=a")
(label_ref (match_operand 1 "" "")))
(use (label_ref (match_operand 2 "" "")))]
""
{
if (s390_nr_constants)
{
output_asm_insn ("bras\t%0,%2", operands);
s390_output_constant_pool (operands[1], operands[2]);
}
return "";
}
[(set_attr "op_type" "NN")
(set_attr "type" "larl")])
(define_insn "literal_pool_64"
[(unspec_volatile [(const_int 0)] UNSPECV_MAIN_POOL)
(set (match_operand:DI 0 "register_operand" "=a")
(label_ref (match_operand 1 "" "")))
(use (label_ref (match_operand 2 "" "")))]
""
{
if (s390_nr_constants)
{
output_asm_insn ("larl\t%0,%1", operands);
s390_output_constant_pool (operands[1], operands[2]);
}
return "";
}
[(set_attr "op_type" "NN")
(set_attr "type" "larl")])
;; Instruction definition to extend a 31-bit pointer into a 64-bit
;; pointer. This is used for compatability.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment