URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
703 |
jeremybenn |
/* All calls must be properly stubified. Complain about any "call
|
2 |
|
|
_objc_msgSend" without the $stub suffix. */
|
3 |
|
|
|
4 |
|
|
/* { dg-do compile { target *-*-darwin* } } */
|
5 |
|
|
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
|
6 |
|
|
/* { dg-require-effective-target ilp32 } */
|
7 |
|
|
/* { dg-options "-Os -mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4" } */
|
8 |
|
|
|
9 |
|
|
typedef struct objc_object { } *id ;
|
10 |
|
|
int x = 41 ;
|
11 |
|
|
|
12 |
|
|
extern "C" {
|
13 |
|
|
extern id objc_msgSend(id self, char * op, ...);
|
14 |
|
|
extern int bogonic (int, int, int);
|
15 |
|
|
}
|
16 |
|
|
|
17 |
|
|
@interface Document {}
|
18 |
|
|
- (Document *) window;
|
19 |
|
|
- (Document *) class;
|
20 |
|
|
- (Document *) close;
|
21 |
|
|
@end
|
22 |
|
|
@implementation Document
|
23 |
|
|
- (Document *) class { }
|
24 |
|
|
- (Document *) close { }
|
25 |
|
|
- (Document *) window { }
|
26 |
|
|
- (void)willEndCloseSheet:(void *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo {
|
27 |
|
|
[[self window] close];
|
28 |
|
|
((void (*)(id, char *, int))objc_msgSend)([self class], (char *)contextInfo, 1);
|
29 |
|
|
((void (*)(id, char *, int))bogonic)([self class], (char *)contextInfo, 1);
|
30 |
|
|
bogonic (3, 4, 5);
|
31 |
|
|
x++;
|
32 |
|
|
}
|
33 |
|
|
@end
|
34 |
|
|
|
35 |
|
|
/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */
|
36 |
|
|
/* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */
|
37 |
|
|
/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */
|
38 |
|
|
/* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */
|
39 |
|
|
/* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.