ham@Neon.Stanford.EDU (Peter R. Ham) (09/14/89)
*** /xxV/cmds/gccnew/pgcc/mi/c-decl.c Fri Sep 1 16:19:26 1989
--- /xxV/cmds/gccnew/dist/c-decl.c Mon Aug 7 17:04:48 1989
***************
*** 1034,1040 ****
TREE_EXTERNAL (decl) = 1;
TREE_PUBLIC (decl) = 1;
- TREE_SHARED (decl) = 1;
/* ANSI standard says implicit declarations are in the innermost block.
So we record the decl in the standard fashion.
--- 1034,1039 ----
***************
*** 2571,2580 ****
/* Assume that otherwise the function can be inlined. */
TREE_INLINE (decl) = 1;
}
- /*
- ** Functions are always implicitly declared "shared".
- */
- TREE_SHARED (decl) = 1;
}
else
{
--- 2570,2575 ----
***************
*** 2603,2622 ****
/* `extern' with initialization is invalid if not at top level. */
if ((specbits & (1 << (int) RID_EXTERN)) && initialized)
error ("`%s' has both `extern' and initializer", name);
- }
- /*
- ** Functions are implicitly declared "shared".
- ** Declarations with the "shared" storage class specifier are
- ** marked.
- */
-
- if (TREE_CODE (declarator) == CALL_EXPR)
- {
- TREE_SHARED (decl) = 1;
- }
- else
- {
- TREE_SHARED (decl) = !!(specbits & (1 << (int) RID_SHARED));
}
}
--- 2598,2603 ----
*** /xxV/cmds/gccnew/pgcc/mi/c-parse.h Fri Sep 1 16:13:46 1989
--- /xxV/cmds/gccnew/dist/c-parse.h Mon Aug 7 17:04:50 1989
***************
*** 34,40 ****
RID_LONG,
RID_AUTO,
RID_STATIC,
- RID_SHARED,
RID_EXTERN,
RID_REGISTER,
RID_TYPEDEF,
--- 34,39 ----
*** /xxV/cmds/gccnew/pgcc/mi/c-parse.tab.c Mon Sep 11 13:28:33 1989
--- /xxV/cmds/gccnew/dist/c-parse.tab.c Tue Aug 8 10:46:59 1989
***************
*** 1,5 ****
! /* A Bison parser, made from ../../mi/c-parse.y */
#define IDENTIFIER 258
#define TYPENAME 259
--- 1,5 ----
! /* A Bison parser, made from c-parse.y */
#define IDENTIFIER 258
#define TYPENAME 259
***************
*** 41,47 ****
#define HYPERUNARY 295
#define POINTSAT 296
! #line 46 "../../mi/c-parse.y"
#include "config.h"
#include "tree.h"
--- 41,47 ----
#define HYPERUNARY 295
#define POINTSAT 296
! #line 47 "c-parse.y"
#include "config.h"
#include "tree.h"
***************
*** 60,68 ****
/* Cause the `yydebug' variable to be defined. */
#define YYDEBUG 1
! #line 67 "../../mi/c-parse.y"
typedef union {long itype; tree ttype; enum tree_code code; } YYSTYPE;
! #line 155 "../../mi/c-parse.y"
/* the declaration found for the last IDENTIFIER token read in.
yylex must look this up to detect typedefs, which get token type TYPENAME,
--- 60,68 ----
/* Cause the `yydebug' variable to be defined. */
#define YYDEBUG 1
! #line 68 "c-parse.y"
typedef union {long itype; tree ttype; enum tree_code code; } YYSTYPE;
! #line 156 "c-parse.y"
/* the declaration found for the last IDENTIFIER token read in.
yylex must look this up to detect typedefs, which get token type TYPENAME,
***************
*** 87,93 ****
#ifndef YYLTYPE
typedef
struct yyltype
! {
int timestamp;
int first_line;
int first_column;
--- 87,93 ----
#ifndef YYLTYPE
typedef
struct yyltype
! {
int timestamp;
int first_line;
int first_column;
***************
*** 95,108 ****
int last_column;
char *text;
}
! yyltype;
#define YYLTYPE yyltype
#endif
- #define YYACCEPT return(0)
- #define YYABORT return(1)
- #define YYERROR return(1)
#include <stdio.h>
#ifndef __STDC__
--- 95,105 ----
int last_column;
char *text;
}
! yyltype;
#define YYLTYPE yyltype
#endif
#include <stdio.h>
#ifndef __STDC__
***************
*** 151,185 ****
};
static const short yyrline[] = { 0,
! 178, 179, 186, 188, 188, 189, 191, 193, 194, 201,
! 207, 209, 211, 213, 215, 216, 217, 220, 226, 228,
! 229, 231, 236, 238, 239, 241, 246, 248, 249, 253,
! 255, 258, 260, 262, 264, 266, 268, 270, 274, 278,
! 281, 284, 287, 291, 293, 295, 297, 302, 304, 309,
! 313, 315, 318, 332, 334, 336, 338, 340, 342, 344,
! 346, 348, 350, 352, 354, 356, 358, 360, 362, 364,
! 366, 370, 419, 420, 422, 424, 426, 433, 437, 439,
! 441, 443, 445, 447, 452, 454, 458, 460, 463, 465,
! 466, 467, 472, 477, 480, 482, 484, 492, 495, 499,
! 501, 503, 511, 514, 516, 518, 527, 530, 534, 536,
! 544, 545, 546, 547, 551, 559, 560, 561, 564, 566,
! 569, 571, 574, 577, 585, 590, 591, 596, 601, 602,
! 607, 609, 613, 615, 617, 623, 626, 633, 635, 640,
! 643, 648, 650, 652, 654, 662, 668, 670, 672, 674,
! 680, 686, 688, 690, 692, 694, 697, 702, 706, 709,
! 711, 713, 715, 718, 720, 723, 726, 729, 732, 736,
! 738, 741, 743, 747, 749, 751, 765, 769, 772, 776,
! 781, 782, 786, 789, 791, 800, 802, 807, 810, 814,
! 817, 821, 824, 827, 830, 834, 837, 841, 845, 847,
! 849, 851, 853, 855, 857, 859, 867, 869, 870, 873,
! 875, 878, 881, 890, 892, 895, 896, 900, 904, 910,
! 915, 917, 919, 923, 926, 927, 929, 932, 936, 937,
! 940, 942, 947, 952, 956, 962, 968, 975, 977, 1009,
! 1009, 1020, 1020, 1024, 1028, 1031, 1034, 1038, 1044, 1050,
! 1056, 1062, 1067, 1067, 1072, 1077, 1083, 1086, 1091, 1093,
! 1096, 1098, 1102, 1107, 1110, 1116, 1119, 1126, 1129, 1134,
! 1136, 1138, 1142, 1144, 1150, 1152, 1154, 1158, 1161, 1167,
! 1170, 1172, 1174, 1176, 1181, 1184
};
static const char * const yytname[] = { 0,
--- 148,182 ----
};
static const short yyrline[] = { 0,
! 179, 180, 187, 189, 189, 190, 192, 194, 195, 202,
! 208, 210, 212, 214, 216, 217, 218, 221, 227, 229,
! 230, 232, 237, 239, 240, 242, 247, 249, 250, 254,
! 256, 259, 261, 263, 265, 267, 269, 271, 275, 279,
! 282, 285, 288, 292, 294, 296, 298, 303, 305, 310,
! 314, 316, 319, 333, 335, 337, 339, 341, 343, 345,
! 347, 349, 351, 353, 355, 357, 359, 361, 363, 365,
! 367, 371, 420, 421, 423, 425, 427, 434, 438, 440,
! 442, 444, 446, 448, 453, 455, 459, 461, 464, 466,
! 467, 468, 473, 478, 481, 483, 485, 493, 496, 500,
! 502, 504, 512, 515, 517, 519, 528, 531, 535, 537,
! 545, 546, 547, 548, 552, 560, 561, 562, 565, 567,
! 570, 572, 575, 578, 586, 591, 592, 597, 602, 603,
! 608, 610, 614, 616, 618, 624, 627, 634, 636, 641,
! 644, 649, 651, 653, 655, 663, 669, 671, 673, 675,
! 681, 687, 689, 691, 693, 695, 698, 703, 707, 710,
! 712, 714, 716, 719, 721, 724, 727, 730, 733, 737,
! 739, 742, 744, 748, 750, 752, 766, 770, 773, 777,
! 782, 783, 787, 790, 792, 801, 803, 808, 811, 815,
! 818, 822, 825, 828, 831, 835, 838, 842, 846, 848,
! 850, 852, 854, 856, 858, 860, 868, 870, 871, 874,
! 876, 879, 882, 891, 893, 896, 897, 901, 905, 911,
! 916, 918, 920, 924, 927, 928, 930, 933, 937, 938,
! 941, 943, 948, 953, 957, 963, 969, 976, 978, 1010,
! 1010, 1021, 1021, 1025, 1029, 1032, 1035, 1039, 1045, 1051,
! 1057, 1063, 1068, 1068, 1073, 1078, 1084, 1087, 1092, 1094,
! 1097, 1099, 1103, 1108, 1111, 1117, 1120, 1127, 1130, 1135,
! 1137, 1139, 1143, 1145, 1151, 1153, 1155, 1159, 1162, 1168,
! 1171, 1173, 1175, 1177, 1182, 1185
};
static const char * const yytname[] = { 0,
***************
*** 719,725 ****
};
#define YYPURE 1
! #line 2 "bison.simple"
/* Skeleton output parser for bison,
copyright (C) 1984 Bob Corbett and Richard Stallman
--- 716,723 ----
};
#define YYPURE 1
! /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
! #line 3 "bison.simple"
/* Skeleton output parser for bison,
copyright (C) 1984 Bob Corbett and Richard Stallman
***************
*** 825,830 ****
--- 823,832 ----
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
+ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
+ #include <alloca.h>
+ #endif
+
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
***************
*** 839,844 ****
--- 841,849 ----
#define YYEMPTY -2
#define YYEOF 0
#define YYFAIL goto yyerrlab;
+ #define YYACCEPT return(0)
+ #define YYABORT return(1)
+ #define YYERROR goto yyerrlab
#define YYTERROR 1
***************
*** 861,875 ****
YYLTYPE yylloc; /* location data for the lookahead */
/* symbol */
! int yynerr; /* number of parse errors so far */
! #ifdef YYDEBUG
! int yydebug = 0; /* nonzero means print parse trace */
#endif
*** /xxV/cmds/gccnew/pgcc/mi/c-parse.y Mon Sep 11 13:27:52 1989
--- /xxV/cmds/gccnew/dist/c-parse.y Mon Aug 7 17:05:22 1989
***************
*** 1315,1326 ****
/* Nonzero if end-of-file has been seen on input. */
static int end_of_file;
- #ifndef WITH_PERPROCESS_VARIABLES
-
/* Data type that represents the GNU C reserved words. */
struct resword { char *name; short token; enum rid rid; };
-
#define MIN_WORD_LENGTH 2 /* minimum size for C keyword */
#define MAX_WORD_LENGTH 9 /* maximum size for C keyword */
#define MIN_HASH_VALUE 4 /* range of the hash keys values */
--- 1315,1323 ----
***************
*** 1464,1477 ****
return 0;
}
- #else WITH_PERPROCESS_VARIABLES
-
- #define NORID RID_UNUSED
-
- #include "perfect-hashing-function.h"
-
- #endif WITH_PERPROCESS_VARIABLES
-
/* The elements of `ridpointers' are identifier nodes
for the reserved type names and storage classes.
It is indexed by a RID_... value. */
--- 1461,1466 ----
***************
*** 1478,1484 ****
tree ridpointers[(int) RID_MAX];
-
int check_newline ();
void
--- 1467,1472 ----
***************
*** 1507,1513 ****
ridpointers[(int) RID_VOLATILE] = get_identifier ("volatile");
ridpointers[(int) RID_AUTO] = get_identifier ("auto");
ridpointers[(int) RID_STATIC] = get_identifier ("static");
- WITH_PERPROCESS_VARIABLES( ridpointers[(int) RID_SHARED] = get_identifier ("shared");)
ridpointers[(int) RID_EXTERN] = get_identifier ("extern");
ridpointers[(int) RID_TYPEDEF] = get_identifier ("typedef");
ridpointers[(int) RID_REGISTER] = get_identifier ("register");
--- 1495,1500 ----
("New file: " "/xxV/cmds/gccnew/pgcc/mi/perfect-hashing-function.h")
/* C code produced by gperf version 1.8.1 (GNU C++ version) */
/* Command-line: gperf -k1,2,$ -p -j1 -g -o -t -N is_reserved_word xp */
/* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word c-parse.gperf */
struct resword { char *name; short token; enum rid rid; };
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 10
#define MIN_HASH_VALUE 5
#define MAX_HASH_VALUE 74
/*
42 keywords
70 is the maximum key range
*/
#ifdef __GNUC__
inline
#endif
static int
hash (str, len)
register char *str;
register int unsigned len;
{
static unsigned char hash_table[] =
{
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 0, 74, 24, 10, 27,
9, 0, 4, 14, 6, 17, 74, 0, 22, 29,
0, 0, 74, 74, 15, 18, 0, 0, 6, 14,
0, 31, 74, 74, 74, 74, 74, 74,
};
return len + hash_table[str[1]] + hash_table[str[0]] + hash_table[str[len - 1]];
}
#ifdef __GNUC__
inline
#endif
struct resword *
is_reserved_word (str, len)
register char *str;
register unsigned int len;
{
static struct resword wordlist[] =
{
{"",}, {"",}, {"",}, {"",}, {"",},
{"union", UNION, NORID},
{"extern", SCSPEC, RID_EXTERN},
{"__const", TYPE_QUAL, RID_CONST},
{"__inline", SCSPEC, RID_INLINE},
{"",},
{"__volatile", TYPE_QUAL, RID_VOLATILE},
{"do", DO, NORID},
{"__typeof", TYPEOF, NORID},
{"__alignof", ALIGNOF, NORID},
{"volatile", TYPE_QUAL, RID_VOLATILE},
{"double", TYPESPEC, RID_DOUBLE},
{"default", DEFAULT, NORID},
{"unsigned", TYPESPEC, RID_UNSIGNED},
{"goto", GOTO, NORID},
{"void", TYPESPEC, RID_VOID},
{"int", TYPESPEC, RID_INT},
{"return", RETURN, NORID},
{"for", FOR, NORID},
{"inline", SCSPEC, RID_INLINE},
{"struct", STRUCT, NORID},
{"while", WHILE, NORID},
{"else", ELSE, NORID},
{"if", IF, NORID},
{"auto", SCSPEC, RID_AUTO},
{"short", TYPESPEC, RID_SHORT},
{"break", BREAK, NORID},
{"float", TYPESPEC, RID_FLOAT},
{"const", TYPE_QUAL, RID_CONST},
{"enum", ENUM, NORID},
{"__asm", ASM, NORID},
{"continue", CONTINUE, NORID},
{"",}, {"",},
{"register", SCSPEC, RID_REGISTER},
{"shared", SCSPEC, RID_SHARED},
{"long", TYPESPEC, RID_LONG},
{"typeof", TYPEOF, NORID},
{"typedef", SCSPEC, RID_TYPEDEF},
{"",},
{"switch", SWITCH, NORID},
{"sizeof", SIZEOF, NORID},
{"",}, {"",}, {"",}, {"",},
{"signed", TYPESPEC, RID_SIGNED},
{"static", SCSPEC, RID_STATIC},
{"char", TYPESPEC, RID_CHAR},
{"",}, {"",},
{"case", CASE, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"asm", ASM, NORID},
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
{
register char *s = wordlist[key].name;
if (*s == *str && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}
("New file: " "/xxV/cmds/gccnew/pgcc/mi/perprocess.h")
#define WITH_PERPROCESS_VARIABLES(statement) statement
/* Output before writable perprocess data. */
#define PERPROCESS_SECTION_ASM_OP ".perprocess"
#define PERPROCESS_BSS_SECTION_ASM_OP ".perprocess_bss"
#define ASM_OUTPUT_PERPROCESS_COMMON(FILE, NAME, SIZE, ROUNDED) \
( fputs (".perprocess_comm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%d\n", (ROUNDED)))
/* This says how to output an assembler line
to define a local common symbol. */
#define ASM_OUTPUT_PERPROCESS_LOCAL(FILE, NAME, SIZE, ROUNDED) \
( fputs (".perprocess_lcomm ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%d\n", (ROUNDED)))
#define ASM_OUTPUT_PERPROCESS_BSS(FILE, NAME, SIZE, ROUNDED) \
( fputs (".perprocess_bss ", (FILE)), \
assemble_name ((FILE), (NAME)), \
fprintf ((FILE), ",%d\n", (ROUNDED)))
*** /xxV/cmds/gccnew/pgcc/mi/print-tree.c Fri Sep 1 16:27:23 1989
--- /xxV/cmds/gccnew/dist/print-tree.c Mon Aug 7 17:10:17 1989
***************
*** 246,257 ****
fputs ("permanent", outfile);
first = 0;
}
- if (TREE_SHARED(node))
- {
- if (!first) putc (' ', outfile);
- fputs ("shared", outfile);
- first = 0;
- }
if (TREE_LANG_FLAG_1 (node))
{
if (!first) putc (' ', outfile);
--- 246,251 ----
***************
*** 268,273 ****
--- 262,273 ----
{
if (!first) putc (' ', outfile);
fputs ("lang_flag_3", outfile);
+ first = 0;
+ }
+ if (TREE_LANG_FLAG_4 (node))
+ {
+ if (!first) putc (' ', outfile);
+ fputs ("lang_flag_4", outfile);
first = 0;
}
fputs ("] ", outfile);
*** /xxV/cmds/gccnew/pgcc/mi/tree.c Tue Sep 5 11:37:27 1989
--- /xxV/cmds/gccnew/dist/tree.c Mon Aug 7 17:11:28 1989
***************
*** 941,958 ****
{
register enum tree_code code = TREE_CODE (arg);
- #ifdef WITH_PERPROCESS_VARIABLES
- /*
- ** The addresses of shared global variables are 'static', but
- ** the addresses of perprocess global variables are not.
- */
- if (((code == VAR_DECL && TREE_SHARED(arg))
- || code == FUNCTION_DECL || code == CONSTRUCTOR
- && (TREE_STATIC (arg) || TREE_EXTERNAL (arg))))
- #else
if ((code == VAR_DECL || code == FUNCTION_DECL || code == CONSTRUCTOR)
&& (TREE_STATIC (arg) || TREE_EXTERNAL (arg)))
- #endif
return 1;
if (code == STRING_CST)
--- 941,948 ----
*** /xxV/cmds/gccnew/pgcc/mi/tree.h Fri Sep 1 16:33:39 1989
--- /xxV/cmds/gccnew/dist/tree.h Mon Aug 7 17:11:34 1989
***************
*** 146,156 ****
unsigned asm_written_attr: 1;
unsigned inline_attr : 1;
unsigned used_attr : 1;
- unsigned shared_attr : 1;
unsigned lang_flag_1 : 1;
unsigned lang_flag_2 : 1;
unsigned lang_flag_3 : 1;
! /* There is room for three more attributes. */
};
/* Define accessors for the fields that all tree nodes have
--- 146,156 ----
unsigned asm_written_attr: 1;
unsigned inline_attr : 1;
unsigned used_attr : 1;
unsigned lang_flag_1 : 1;
unsigned lang_flag_2 : 1;
unsigned lang_flag_3 : 1;
! unsigned lang_flag_4 : 1;
! /* There is room for four more attributes. */
};
/* Define accessors for the fields that all tree nodes have
***************
*** 273,293 ****
/* Nonzero in a _DECL if the name is used in its scope. */
#define TREE_USED(NODE) ((NODE)->common.used_attr)
- #ifdef WITH_PERPROCESS_VARIABLES
- /*
- ** Nonzero in a _DECL if the variable has the "shared" storage class
- */
- #define TREE_SHARED(NODE) ((NODE)->common.shared_attr)
- #endif
-
#define TREE_LANG_FLAG_1(NODE) ((NODE)->common.lang_flag_1)
#define TREE_LANG_FLAG_2(NODE) ((NODE)->common.lang_flag_2)
#define TREE_LANG_FLAG_3(NODE) ((NODE)->common.lang_flag_3)
!
! #ifndef WITH_PERPROCESS_VARIABLES
! #define TREE_LANG_FLAG_4(NODE) ((NODE)->common.lang_flag_4))
! #endif
!
/* Define additional fields and accessors for nodes representing constants. */
--- 273,282 ----
/* Nonzero in a _DECL if the name is used in its scope. */
#define TREE_USED(NODE) ((NODE)->common.used_attr)
#define TREE_LANG_FLAG_1(NODE) ((NODE)->common.lang_flag_1)
#define TREE_LANG_FLAG_2(NODE) ((NODE)->common.lang_flag_2)
#define TREE_LANG_FLAG_3(NODE) ((NODE)->common.lang_flag_3)
! #define TREE_LANG_FLAG_4(NODE) ((NODE)->common.lang_flag_4)
/* Define additional fields and accessors for nodes representing constants. */
*** /xxV/cmds/gccnew/pgcc/mi/varasm.c Tue Sep 5 11:48:53 1989
--- /xxV/cmds/gccnew/dist/varasm.c Tue Aug 29 13:41:45 1989
***************
*** 70,81 ****
void output_constant ();
void output_constructor ();
- #ifdef WITH_PERPROCESS_VARIABLES
- static enum in_section {no_section, in_text, in_data,
- in_perprocess, in_perprocess_bss} in_section = no_section;
- #else WITH_PERPROCESS_VARIABLES
static enum in_section {no_section, in_text, in_data} in_section = no_section;
- #endif WITH_PERPROCESS_VARIABLES
/* Tell assembler to switch to text section. */
--- 70,76 ----
***************
*** 111,143 ****
}
}
- #ifdef WITH_PERPROCESS_VARIABLES
- /* Tell assembler to switch to perprocess section. */
-
- void
- perprocess_section ()
- {
- if (in_section != in_perprocess)
- {
- fprintf (asm_out_file, "%s\n", PERPROCESS_SECTION_ASM_OP);
- in_section = in_perprocess;
- }
- }
-
-
- /* Tell assembler to switch to perprocess_bss section. */
-
- void
- perprocess_bss_section ()
- {
- if (in_section != in_perprocess_bss)
- {
- fprintf (asm_out_file, "%s\n", PERPROCESS_BSS_SECTION_ASM_OP);
- in_section = in_perprocess_bss;
- }
- }
- #endif
-
/* Create the rtl to represent a function, for a function definition.
DECL is a FUNCTION_DECL node which describes which function.
The rtl is stored into DECL. */
--- 106,111 ----
***************
*** 256,294 ****
var_labelno++;
}
- #ifdef WITH_PERPROCESS_VARIABLES
- /*
- ** If the variables is a perprocess variable residing in the perprocess
- ** segment, then generate a declaration that indexes off the
- ** perprocess segment register.
- */
- if (TREE_SHARED (decl))
- {
- DECL_RTL (decl) = gen_rtx (MEM, DECL_MODE (decl),
- gen_rtx (SYMBOL_REF, Pmode, name));
- }
- else
- {
- DECL_RTL (decl) =
- gen_rtx (MEM, DECL_MODE (decl),
- gen_rtx (PLUS, Pmode,
- gen_rtx (SYMBOL_REF, Pmode, name),
- gen_rtx (REG, Pmode,
- PERPROCESS_SEGMENT_POINTER_REGNUM)
- )
- );
- /*
- ** I'm pretty wary of this side effect.
- ** Hopefully, it will get rid of some unintentional
- ** sharing that is causing me major problems.
- */
- DECL_RTL(decl)->used = 1;
- }
- #else WITH_PERPROCESS_VARIABLES
DECL_RTL (decl) = gen_rtx (MEM, DECL_MODE (decl),
gen_rtx (SYMBOL_REF, Pmode, name));
- #endif WITH_PERPROCESS_VARIABLES
-
if (TREE_VOLATILE (decl))
MEM_VOLATILE_P (DECL_RTL (decl)) = 1;
if (TREE_READONLY (decl))
--- 224,231 ----
***************
*** 517,540 ****
app_disable ();
- #ifdef WITH_PERPROCESS_VARIABLES
- /*
- ** Shared global variables and perprocess variables have different
- ** declarations. Shared variables are only a symbol reference while
- ** perprocess variables are a symbol reference indexed off the
- ** perprocess segment pointer register as constructed in make_decl_rtl.
- */
- if (TREE_SHARED(decl))
- {
- name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
- }
- else
- {
- name = XSTR (XEXP (XEXP (DECL_RTL (decl), 0), 0), 0);
- }
- #else WITH_PERPROCESS_VARIABLES
name = XSTR (XEXP (DECL_RTL (decl), 0), 0);
- #endif WITH_PERPROCESS_VARIABLES
/* Handle uninitialized definitions. */
--- 454,460 ----
***************
*** 554,595 ****
* (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
if (flag_shared_data)
data_section ();
-
- #ifdef WITH_PERPROCESS_VARIABLES
- /*
- ** I'm a little worried about these two perprocess calls.
- ** They were commented out in my previous version. Maybe my assembler
- ** or linker
- ** doesn't handle thse correctly. Why did it work before?
- */
-
- if (TREE_SHARED (decl))
- {
- if (TREE_PUBLIC (decl))
- ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded);
- else
- ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
- }
- else
- {
- if (TREE_PUBLIC (decl))
- {
- ASM_GLOBALIZE_LABEL (asm_out_file, name);
- ASM_OUTPUT_PERPROCESS_BSS (asm_out_file, name, size, rounded);
- }
- else
- {
- ASM_OUTPUT_PERPROCESS_BSS (asm_out_file, name, size, rounded);
- }
- }
- return;
- #else
if (TREE_PUBLIC (decl))
ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded);
else
ASM_OUTPUT_LOCAL (asm_out_file, name, size, rounded);
return;
- #endif
}
/* Handle initialized definitions. */
--- 474,484 ----
***************
*** 615,635 ****
if (TREE_READONLY (decl) && ! TREE_VOLATILE (decl))
text_section ();
else
- #ifdef WITH_PERPROCESS_VARIABLES
- {
- if (TREE_SHARED (decl))
- {
- data_section ();
- }
- else
- {
- perprocess_section ();
- }
- }
- #else
data_section ();
- #endif
-
/* Output the alignment of this data. */
for (i = 0; DECL_ALIGN (decl) >= BITS_PER_UNIT << (i + 1); i++);
--- 504,510 ----
Newfile: tm-vax-perprocess-Vsytem.h
#include "tm-vax.h"
#undef FIXED_REGISTERS
/* 1 for registers that have pervasive standard uses
and are not available for the register allocator.
On the vax, these are the PPSP (perprocess segment pointer),
AP, FP, SP and PC. */
#define FIXED_REGISTERS {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}
#undef CALL_USED_REGISTERS
/* 1 for registers not available across function calls.
These must include the FIXED_REGISTERS and also any
registers that can be used without being saved.
The latter must include the registers where values are returned
and the register where structure-value addresses are passed.
Aside from that, you can include as many other registers as you like. */
#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1}
/* Base register for access to global variables in the perprocess segment. */
#define PERPROCESS_SEGMENT_POINTER_REGNUM 11
#include "perprocess.h"
--
Peter Ham PO Box 3430 (h)(415) 324-9645
MS Computer Science Student Stanford, CA ham@polya.stanford.edu
Stanford University 94309 (o)(415) 723-2067