arm.md (*call_value_symbol): Fix operand for interworking.

2015-09-17  Christian Bruel  <christian.bruel@st.com>

	* config/arm/arm.md (*call_value_symbol): Fix operand for interworking.

From-SVN: r227880
This commit is contained in:
Christian Bruel 2015-09-17 17:57:59 +02:00 committed by Christian Bruel
parent 4e9a8214b8
commit 1eb50e95fb
4 changed files with 49 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2015-09-17 Christian Bruel <christian.bruel@st.com>
* config/arm/arm.md (*call_value_symbol): Fix operand for interworking.
2015-09-17 Richard Henderson <rth@redhat.com>
PR libstdc++/65913

View file

@ -7891,7 +7891,7 @@
/* Switch mode now when possible. */
if (SYMBOL_REF_DECL (op) && !TREE_PUBLIC (SYMBOL_REF_DECL (op))
&& arm_arch5 && arm_change_mode_p (SYMBOL_REF_DECL (op)))
return NEED_PLT_RELOC ? \"blx%?\\t%a0(PLT)\" : \"blx%?\\t(%a0)\";
return NEED_PLT_RELOC ? \"blx%?\\t%a1(PLT)\" : \"blx%?\\t(%a1)\";
return NEED_PLT_RELOC ? \"bl%?\\t%a1(PLT)\" : \"bl%?\\t%a1\";
}"

View file

@ -1,3 +1,7 @@
2015-09-17 Christian Bruel <christian.bruel@st.com>
* gcc.target/arm/attr_thumb-static2.c: New test.
2015-09-17 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/overflow_sum3.adb: New test.

View file

@ -0,0 +1,40 @@
/* Check that interwork between static functions is correctly resolved. */
/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
/* { dg-options "-O0 -march=armv7-a -mfloat-abi=hard" } */
/* { dg-do compile } */
struct _NSPoint
{
float x;
float y;
};
typedef struct _NSPoint NSPoint;
static NSPoint
__attribute__ ((target("arm")))
NSMakePoint (float x, float y)
{
NSPoint point;
point.x = x;
point.y = y;
return point;
}
static NSPoint
__attribute__ ((target("thumb")))
RelativePoint (NSPoint point, NSPoint refPoint)
{
return NSMakePoint (refPoint.x + point.x, refPoint.y + point.y);
}
NSPoint
__attribute__ ((target("arm")))
g(NSPoint refPoint)
{
float pointA, pointB;
return RelativePoint (NSMakePoint (0, pointA), refPoint);
}
/* { dg-final { scan-assembler-times "blx" 2 } } */