diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2002-09-17 19:02:58 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2002-09-17 19:02:58 +0000 |
commit | 24491a09505847e6e42b50917948ac5dc5780715 (patch) | |
tree | 3676f6184e64fbd9cb932b97c0330707f14a408d /gcc | |
parent | ec55ac68646195e5469bc622e4e701d28b646503 (diff) | |
download | gcc-24491a09505847e6e42b50917948ac5dc5780715.zip gcc-24491a09505847e6e42b50917948ac5dc5780715.tar.gz gcc-24491a09505847e6e42b50917948ac5dc5780715.tar.bz2 |
optabs.c (prepare_cmp_insn): Let emit_library_call_value generate a pseudo reg that receives the result of a...
* optabs.c (prepare_cmp_insn): Let emit_library_call_value
generate a pseudo reg that receives the result of a libcall.
(prepare_float_lib_cmp): Likewise.
From-SVN: r57255
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/optabs.c | 47 |
2 files changed, 23 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index debee29..34852fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-09-17 Kazu Hirata <kazu@cs.umass.edu> + + * optabs.c (prepare_cmp_insn): Let emit_library_call_value + generate a pseudo reg that receives the result of a libcall. + (prepare_float_lib_cmp): Likewise. + 2002-09-17 Steve Ellcey <sje@cup.hp.com> * config/ia64/elf.h: Remove CPP_PREDEFINES. diff --git a/gcc/optabs.c b/gcc/optabs.c index 7ceec12..0d13bb1 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -3436,29 +3436,23 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, purpose) #endif { #ifdef TARGET_MEM_FUNCTIONS - emit_library_call (memcmp_libfunc, LCT_PURE_MAKE_BLOCK, - TYPE_MODE (integer_type_node), 3, - XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, - convert_to_mode (TYPE_MODE (sizetype), size, - TREE_UNSIGNED (sizetype)), - TYPE_MODE (sizetype)); + result = emit_library_call_value (memcmp_libfunc, NULL_RTX, LCT_PURE_MAKE_BLOCK, + TYPE_MODE (integer_type_node), 3, + XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, + convert_to_mode (TYPE_MODE (sizetype), size, + TREE_UNSIGNED (sizetype)), + TYPE_MODE (sizetype)); #else - emit_library_call (bcmp_libfunc, LCT_PURE_MAKE_BLOCK, - TYPE_MODE (integer_type_node), 3, - XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, - convert_to_mode (TYPE_MODE (integer_type_node), - size, - TREE_UNSIGNED (integer_type_node)), - TYPE_MODE (integer_type_node)); + result = emit_library_call_value (bcmp_libfunc, NULL_RTX, LCT_PURE_MAKE_BLOCK, + TYPE_MODE (integer_type_node), 3, + XEXP (x, 0), Pmode, XEXP (y, 0), Pmode, + convert_to_mode (TYPE_MODE (integer_type_node), + size, + TREE_UNSIGNED (integer_type_node)), + TYPE_MODE (integer_type_node)); #endif - /* Immediately move the result of the libcall into a pseudo - register so reload doesn't clobber the value if it needs - the return register for a spill reg. */ - result = gen_reg_rtx (TYPE_MODE (integer_type_node)); result_mode = TYPE_MODE (integer_type_node); - emit_move_insn (result, - hard_libcall_value (result_mode)); } *px = result; *py = const0_rtx; @@ -3483,14 +3477,8 @@ prepare_cmp_insn (px, py, pcomparison, size, pmode, punsignedp, purpose) if (unsignedp && ucmp_optab->handlers[(int) mode].libfunc) libfunc = ucmp_optab->handlers[(int) mode].libfunc; - emit_library_call (libfunc, LCT_CONST_MAKE_BLOCK, word_mode, 2, x, mode, - y, mode); - - /* Immediately move the result of the libcall into a pseudo - register so reload doesn't clobber the value if it needs - the return register for a spill reg. */ - result = gen_reg_rtx (word_mode); - emit_move_insn (result, hard_libcall_value (word_mode)); + result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK, + word_mode, 2, x, mode, y, mode); /* Integer comparison returns a result that must be compared against 1, so that even if we do an unsigned compare afterward, @@ -4006,9 +3994,8 @@ prepare_float_lib_cmp (px, py, pcomparison, pmode, punsignedp) if (libfunc == 0) abort (); - result = gen_reg_rtx (word_mode); - emit_library_call_value (libfunc, result, LCT_CONST_MAKE_BLOCK, - word_mode, 2, x, mode, y, mode); + result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK, + word_mode, 2, x, mode, y, mode); *px = result; *py = const0_rtx; *pmode = word_mode; |