/* Built-in and inline functions for gcj
- Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2009
Free Software Foundation, Inc.
This file is part of GCC.
build_addr_sum (tree type, tree addr, tree offset)
{
tree ptr_type = build_pointer_type (type);
- return fold_build2 (PLUS_EXPR,
- ptr_type,
- fold_convert (ptr_type, addr), offset);
+ return fold_build2 (POINTER_PLUS_EXPR,
+ ptr_type,
+ fold_convert (ptr_type, addr),
+ fold_convert (sizetype, offset));
}
/* Make sure that this-arg is non-NULL. This is a security check. */
tree orig_call)
{
enum machine_mode mode = TYPE_MODE (int_type_node);
- if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
- || sync_compare_and_swap[mode] != CODE_FOR_nothing)
+ if (sync_compare_and_swap[mode] != CODE_FOR_nothing)
{
tree addr, stmt;
UNMARSHAL5 (orig_call);
tree orig_call)
{
enum machine_mode mode = TYPE_MODE (long_type_node);
- if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
- || sync_compare_and_swap[mode] != CODE_FOR_nothing)
+ if (sync_compare_and_swap[mode] != CODE_FOR_nothing)
{
tree addr, stmt;
UNMARSHAL5 (orig_call);
tree orig_call)
{
enum machine_mode mode = TYPE_MODE (ptr_type_node);
- if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
- || sync_compare_and_swap[mode] != CODE_FOR_nothing)
+ if (sync_compare_and_swap[mode] != CODE_FOR_nothing)
{
tree addr, stmt;
int builtin;
{
enum machine_mode mode = TYPE_MODE (long_type_node);
gcc_assert (method_return_type == boolean_type_node);
- if (sync_compare_and_swap_cc[mode] != CODE_FOR_nothing
- || sync_compare_and_swap[mode] != CODE_FOR_nothing)
+ if (sync_compare_and_swap[mode] != CODE_FOR_nothing)
return boolean_true_node;
else
return boolean_false_node;