Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
6d549148
Commit
6d549148
authored
Feb 20, 2011
by
Nicola Pero
Committed by
Nicola Pero
Feb 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted usage of TARGET_64BIT for code generation for GNU Objective-C runtime
From-SVN: r170343
parent
3890ce93
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
23 deletions
+59
-23
gcc/objc/ChangeLog
+7
-0
gcc/objc/objc-act.c
+18
-0
gcc/objc/objc-gnu-runtime-abi-01.c
+1
-19
gcc/testsuite/ChangeLog
+8
-1
gcc/testsuite/obj-c++.dg/selector-3.mm
+4
-1
gcc/testsuite/objc.dg/layout-2.m
+14
-0
gcc/testsuite/objc.dg/selector-3.m
+4
-1
gcc/testsuite/objc.dg/type-size-3.m
+3
-1
No files found.
gcc/objc/ChangeLog
View file @
6d549148
2011
-
02
-
19
Nicola
Pero
<
nicola
.
pero
@meta
-
innovation
.
com
>
*
objc
-
gnu
-
runtime
-
abi
-
01
.
c
(
TARGET_64BIT
)
:
Removed
.
Removed
usage
of
padding
fields
.
Do
not
include
tm
.
h
.
*
objc
-
act
.
c
(
objc_write_global_declaration
)
:
Set
input_location
to
BUILTINS_LOCATION
while
generating
runtime
metadata
.
2011
-
01
-
19
Nicola
Pero
<
nicola
.
pero
@meta
-
innovation
.
com
>
PR
objc
/
47784
...
...
gcc/objc/objc-act.c
View file @
6d549148
...
...
@@ -466,6 +466,8 @@ objc_write_global_declarations (void)
and code if only checking syntax, or if generating a PCH file. */
if
(
!
flag_syntax_only
&&
!
pch_file
)
{
location_t
saved_location
;
/* If gen_declaration desired, open the output file. */
if
(
flag_gen_declaration
)
{
...
...
@@ -475,8 +477,24 @@ objc_write_global_declarations (void)
fatal_error
(
"can%'t open %s: %m"
,
dumpname
);
free
(
dumpname
);
}
/* Set the input location to BUILTINS_LOCATION. This is good
for error messages, in case any is generated while producing
the metadata, but it also silences warnings that would be
produced when compiling with -Wpadded in case when padding is
automatically added to the built-in runtime data structure
declarations. We know about this padding, and it is fine; we
don't want users to see any warnings about it if they use
-Wpadded. */
saved_location
=
input_location
;
input_location
=
BUILTINS_LOCATION
;
/* Compute and emit the meta-data tables for this runtime. */
(
*
runtime
.
generate_metadata
)
();
/* Restore the original location, just in case it mattered. */
input_location
=
saved_location
;
/* ... and then close any declaration file we opened. */
if
(
gen_declaration_file
)
fclose
(
gen_declaration_file
);
...
...
gcc/objc/objc-gnu-runtime-abi-01.c
View file @
6d549148
...
...
@@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#ifdef OBJCPLUS
...
...
@@ -83,11 +82,6 @@ along with GCC; see the file COPYING3. If not see
if (VERS) \
DECL_ATTRIBUTES (DECL) = build_tree_list ((VERS), (KIND));
/* FIXME: Remove this macro, not needed. */
#ifndef TARGET_64BIT
#define TARGET_64BIT 0
#endif
static
void
gnu_runtime_01_initialize
(
void
);
static
void
build_selector_template
(
void
);
...
...
@@ -1995,9 +1989,7 @@ build_objc_symtab_template (void)
/* short cat_def_cnt; */
add_field_decl
(
short_integer_type_node
,
"cat_def_cnt"
,
&
chain
);
/* FIXME: Remove. */
if
(
TARGET_64BIT
)
add_field_decl
(
integer_type_node
,
"_explicit_padder"
,
&
chain
);
/* Note that padding will be added here on LP64. */
/* void *defs[imp_count + cat_count (+ 1)]; */
/* NB: The index is one less than the size of the array. */
...
...
@@ -2043,19 +2035,9 @@ init_objc_symtab (tree type)
CONSTRUCTOR_APPEND_ELT
(
v
,
NULL_TREE
,
build_int_cst
(
short_integer_type_node
,
cat_count
));
/* FIXME: Remove. */
if
(
TARGET_64BIT
)
CONSTRUCTOR_APPEND_ELT
(
v
,
NULL_TREE
,
build_int_cst
(
integer_type_node
,
0
));
/* cls_def = { ..., { &Foo, &Bar, ...}, ... } */
field
=
TYPE_FIELDS
(
type
);
/* FIXME: Remove. */
if
(
TARGET_64BIT
)
field
=
DECL_CHAIN
(
field
);
field
=
DECL_CHAIN
(
DECL_CHAIN
(
DECL_CHAIN
(
DECL_CHAIN
(
field
))));
CONSTRUCTOR_APPEND_ELT
(
v
,
NULL_TREE
,
init_def_list
(
TREE_TYPE
(
field
)));
...
...
gcc/testsuite/ChangeLog
View file @
6d549148
2011-02-19 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/layout-2.m: New.
* objc.dg/selector-3.m: Adjusted location of error message.
* objc.dg/type-size-3.m: Same.
* obj-c++.dg/selector-3.mm: Same.
2011-02-19 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc/47784
* objc.dg/property/dotsyntax-22.m: New.
* obj-c++.dg/property/dotsyntax-22.mm: New.
...
...
@@ -74,7 +81,7 @@
2011-02-18 Iain Sandoe <iains@gcc.gnu.org>
* objc/execute/exceptions/foward-1.x: New.
2011-02-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/47789
...
...
gcc/testsuite/obj-c++.dg/selector-3.mm
View file @
6d549148
...
...
@@ -22,5 +22,8 @@ typedef const struct objc_selector *SEL;
a
=
@selector
(
b1ar
);
b
=
@selector
(
bar
);
}
@end
/* { dg-warning "creating selector for nonexistent method .b1ar." } */
@end
/* FIXME: The error message should be on the correct line. */
/* { dg-warning "creating selector for nonexistent method .b1ar." "" { target *-*-* } 0 } */
gcc/testsuite/objc.dg/layout-2.m
0 → 100644
View file @
6d549148
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, February 2011. */
/* Ensure that -Wpadded generates no warnings during runtime structure metadata
generation. */
/* { dg-do compile } */
/* { dg-options "-Wpadded" } */
#include "../objc-obj-c++-shared/Object1.h"
/* Implement a class, so that the metadata generation happens. */
@interface
MyClass
:
Object
@end
@implementation
MyClass
@end
gcc/testsuite/objc.dg/selector-3.m
View file @
6d549148
...
...
@@ -23,5 +23,8 @@ typedef const struct objc_selector *SEL;
a
=
@selector
(
b1ar
);
b
=
@selector
(
bar
);
}
@end
/* { dg-warning "creating selector for nonexistent method .b1ar." } */
@end
/* FIXME: The error message should be on the correct line. */
/* { dg-warning "creating selector for nonexistent method .b1ar." "" { target *-*-* } 0 } */
gcc/testsuite/objc.dg/type-size-3.m
View file @
6d549148
...
...
@@ -15,4 +15,6 @@ typedef struct
@end
@implementation
Test
@end
/* { dg-error "instance variable has unknown size" } */
@end
/* { dg-error "instance variable has unknown size" "" { target *-*-* } 0 } */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment