Commit 0e1ad529 by Fariborz Jahanian Committed by Fariborz Jahanian

No darwin non-lazy-ptr for address calculatation when not needed.

OKed by Geoff Keating.

From-SVN: r90925
parent 075523c6
2004-11-18 Fariborz Jahanian <fjahanian@apple.com>
* config/darwin.c (machopic_data_defined_p): return 1 for
MACHOPIC_DEFINED_FUNCTION.
2004-11-19 Jeff Law <law@redhat.com> 2004-11-19 Jeff Law <law@redhat.com>
* tree-ssa.c (verify_ssa): Remove redundant checking of PHI * tree-ssa.c (verify_ssa): Remove redundant checking of PHI
......
...@@ -169,6 +169,7 @@ machopic_data_defined_p (rtx sym_ref) ...@@ -169,6 +169,7 @@ machopic_data_defined_p (rtx sym_ref)
switch (machopic_classify_symbol (sym_ref)) switch (machopic_classify_symbol (sym_ref))
{ {
case MACHOPIC_DEFINED_DATA: case MACHOPIC_DEFINED_DATA:
case MACHOPIC_DEFINED_FUNCTION:
return 1; return 1;
default: default:
return 0; return 0;
......
/* { dg-do compile { target powerpc*-apple-darwin* } } */
/* { dg-options "-S" } */
void f () __attribute__((weak_import));
typedef void PF (void);
void f(void){};
PF* g (void) { return f; }
int main()
{
(*g())();
return 0;
}
/* { dg-final { scan-assembler "non_lazy_ptr" } } */
/* { dg-do compile { target powerpc*-apple-darwin* } } */
/* { dg-options "-S" } */
typedef void PF (void);
static void f(void) {
}
void f1(void) {
}
extern void f2(void) {
}
static void f3(void);
__private_extern__ void pe(void)
{
}
PF* g (void) { f(); return f; }
PF* x (void) { return f1; }
PF* y (void) { f2(); return f2; }
PF* z (void) { return f3; }
PF* w (void) { pe(); return pe; }
int main()
{
(*g())();
(*x())();
(*y())();
(*z())();
(*w())();
return 0;
}
void f3(void) {
}
/* { dg-final { scan-assembler-not "non_lazy_ptr" } } */
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