You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
#include "ggc.h"
#include "recog.h"
#include "langhooks.h"
+#include "target.h"
static rtx break_out_memory_refs (rtx);
static void emit_stack_probe (rtx);
rtx x)
{
#ifndef POINTERS_EXTEND_UNSIGNED
+ gcc_assert (GET_MODE (x) == to_mode || GET_MODE (x) == VOIDmode);
return x;
#else /* defined(POINTERS_EXTEND_UNSIGNED) */
enum machine_mode from_mode;
win2:
x = oldx;
win:
- if (flag_force_addr && ! cse_not_expected && !REG_P (x)
- /* Don't copy an addr via a reg if it is one of our stack slots. */
- && ! (GET_CODE (x) == PLUS
- && (XEXP (x, 0) == virtual_stack_vars_rtx
- || XEXP (x, 0) == virtual_incoming_args_rtx)))
+ if (flag_force_addr && ! cse_not_expected && !REG_P (x))
{
- if (general_operand (x, Pmode))
- x = force_reg (Pmode, x);
- else
- x = force_operand (x, NULL_RTX);
+ x = force_operand (x, NULL_RTX);
+ x = force_reg (Pmode, x);
}
}
/* Return an rtx representing the register or memory location
in which a scalar value of data type VALTYPE
was returned by a function call to function FUNC.
- FUNC is a FUNCTION_DECL node if the precise function is known,
- otherwise 0.
+ FUNC is a FUNCTION_DECL, FNTYPE a FUNCTION_TYPE node if the precise
+ function is known, otherwise 0.
OUTGOING is 1 if on a machine with register windows this function
should return the register in which the function will put its result
and 0 otherwise. */
rtx
-hard_function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
+hard_function_value (tree valtype, tree func, tree fntype,
int outgoing ATTRIBUTE_UNUSED)
{
rtx val;
-#ifdef FUNCTION_OUTGOING_VALUE
- if (outgoing)
- val = FUNCTION_OUTGOING_VALUE (valtype, func);
- else
-#endif
- val = FUNCTION_VALUE (valtype, func);
+ val = targetm.calls.function_value (valtype, func ? func : fntype, outgoing);
if (REG_P (val)
&& GET_MODE (val) == BLKmode)