Lines Matching defs:AD

29 static void  usage(ArchDesc& AD);          // Print usage message and exit
51 ArchDesc AD; // Architecture Description object
52 globalAD = &AD;
55 ADLParser *ADL_Parse; // ADL Parser object to parse AD file
58 if( argc == 1 ) usage(AD); // No arguments? Then print usage
70 AD._dfa_debug += 1; // Set Debug Flag
73 AD._adlocation_debug += 1; // Set Debug ad location Flag
76 AD._no_output ^= 1; // Toggle no_output flag
79 AD._quiet_mode ^= 1; // Toggle quiet_mode flag
82 AD._disable_warnings ^= 1; // Toggle disable_warnings flag
85 AD._dfa_small += 1; // Set Mode Flag
88 AD._CPP_file._name = s;
90 AD._CPP_CLONE_file._name = base_plus_suffix(base,"_clone.cpp");
91 AD._CPP_EXPAND_file._name = base_plus_suffix(base,"_expand.cpp");
92 AD._CPP_FORMAT_file._name = base_plus_suffix(base,"_format.cpp");
93 AD._CPP_GEN_file._name = base_plus_suffix(base,"_gen.cpp");
94 AD._CPP_MISC_file._name = base_plus_suffix(base,"_misc.cpp");
95 AD._CPP_PEEPHOLE_file._name = base_plus_suffix(base,"_peephole.cpp");
96 AD._CPP_PIPELINE_file._name = base_plus_suffix(base,"_pipeline.cpp");
101 AD._HPP_file._name = s; s += strlen(s);
104 AD._VM_file._name = s; s += strlen(s);
107 AD._DFA_file._name = s;
108 AD._bug_file._name = s;
112 AD._adl_debug++; // Increment internal debug level
115 AD._cisc_spill_debug = true;
124 AD.set_preproc_def(flag, def);
131 AD.set_preproc_def(flag, NULL);
135 usage(AD); // So print usage and exit
140 AD._ADL_file._name = argv[i]; // Set the input filename
145 AD._DFA_file._name = base_plus_suffix(temp,".cpp");
148 AD._CPP_file._name = base_plus_suffix(temp,".cpp");
149 AD._CPP_CLONE_file._name = base_plus_suffix(temp,"_clone.cpp");
150 AD._CPP_EXPAND_file._name = base_plus_suffix(temp,"_expand.cpp");
151 AD._CPP_FORMAT_file._name = base_plus_suffix(temp,"_format.cpp");
152 AD._CPP_GEN_file._name = base_plus_suffix(temp,"_gen.cpp");
153 AD._CPP_MISC_file._name = base_plus_suffix(temp,"_misc.cpp");
154 AD._CPP_PEEPHOLE_file._name = base_plus_suffix(temp,"_peephole.cpp");
155 AD._CPP_PIPELINE_file._name = base_plus_suffix(temp,"_pipeline.cpp");
156 AD._HPP_file._name = base_plus_suffix(temp,".hpp");
159 AD._VM_file._name = base_plus_suffix(temp,".hpp");
162 AD._bug_file._name = base_plus_suffix(temp,".out");
168 if (AD.open_files() == 0) return 1; // Open all input/output files
171 FileBuff ADL_Buf(&AD._ADL_file, AD); // Create a file buffer for input file
173 // Get pointer to legal text at the beginning of AD file.
178 ADL_Parse = new ADLParser(ADL_Buf, AD); // Create a parser to parse the buffer
181 if( AD._dfa_debug >= 1 ) { // For higher debug settings, print dump
182 AD.dump();
188 AD.verify();
191 AD.generateMatchLists();
192 AD.identify_unique_operands();
193 AD.identify_cisc_spill_instructions();
194 AD.identify_short_branches();
196 AD.addSunCopyright(legal_text, legal_sz, AD._HPP_file._fp); // .hpp
197 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_file._fp); // .cpp
198 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_CLONE_file._fp); // .cpp
199 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_EXPAND_file._fp); // .cpp
200 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_FORMAT_file._fp); // .cpp
201 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_GEN_file._fp); // .cpp
202 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_MISC_file._fp); // .cpp
203 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_PEEPHOLE_file._fp); // .cpp
204 AD.addSunCopyright(legal_text, legal_sz, AD._CPP_PIPELINE_file._fp); // .cpp
205 AD.addSunCopyright(legal_text, legal_sz, AD._VM_file._fp); // .hpp
206 AD.addSunCopyright(legal_text, legal_sz, AD._DFA_file._fp); // .cpp
208 AD.addIncludeGuardStart(AD._HPP_file, "GENERATED_ADFILES_AD_HPP"); // .hpp
209 AD.addIncludeGuardStart(AD._VM_file, "GENERATED_ADFILES_ADGLOBALS_HPP"); // .hpp
211 AD.addInclude(AD._CPP_file, "precompiled.hpp");
212 AD.addInclude(AD._CPP_file, "adfiles", get_basename(AD._VM_file._name));
213 AD.addInclude(AD._CPP_file, "adfiles", get_basename(AD._HPP_file._name));
214 AD.addInclude(AD._CPP_file, "memory/allocation.inline.hpp");
215 AD.addInclude(AD._CPP_file, "asm/assembler.hpp");
216 AD.addInclude(AD._CPP_file, "code/vmreg.hpp");
217 AD.addInclude(AD._CPP_file, "gc_interface/collectedHeap.inline.hpp");
218 AD.addInclude(AD._CPP_file, "oops/compiledICHolderOop.hpp");
219 AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
220 AD.addInclude(AD._CPP_file, "oops/methodOop.hpp");
221 AD.addInclude(AD._CPP_file, "oops/oop.inline.hpp");
222 AD.addInclude(AD._CPP_file, "oops/oop.inline2.hpp");
223 AD.addInclude(AD._CPP_file, "opto/cfgnode.hpp");
224 AD.addInclude(AD._CPP_file, "opto/locknode.hpp");
225 AD.addInclude(AD._CPP_file, "opto/opcodes.hpp");
226 AD.addInclude(AD._CPP_file, "opto/regalloc.hpp");
227 AD.addInclude(AD._CPP_file, "opto/regmask.hpp");
228 AD.addInclude(AD._CPP_file, "opto/runtime.hpp");
229 AD.addInclude(AD._CPP_file, "runtime/biasedLocking.hpp");
230 AD.addInclude(AD._CPP_file, "runtime/sharedRuntime.hpp");
231 AD.addInclude(AD._CPP_file, "runtime/stubRoutines.hpp");
232 AD.addInclude(AD._CPP_file, "utilities/growableArray.hpp");
234 AD.addInclude(AD._CPP_file, "assembler_x86.inline.hpp");
235 AD.addInclude(AD._CPP_file, "nativeInst_x86.hpp");
236 AD.addInclude(AD._CPP_file, "vmreg_x86.inline.hpp");
239 AD.addInclude(AD._CPP_file, "assembler_sparc.inline.hpp");
240 AD.addInclude(AD._CPP_file, "nativeInst_sparc.hpp");
241 AD.addInclude(AD._CPP_file, "vmreg_sparc.inline.hpp");
244 AD.addInclude(AD._CPP_file, "assembler_arm.inline.hpp");
245 AD.addInclude(AD._CPP_file, "nativeInst_arm.hpp");
246 AD.addInclude(AD._CPP_file, "vmreg_arm.inline.hpp");
248 AD.addInclude(AD._HPP_file, "memory/allocation.hpp");
249 AD.addInclude(AD._HPP_file, "opto/machnode.hpp");
250 AD.addInclude(AD._HPP_file, "opto/node.hpp");
251 AD.addInclude(AD._HPP_file, "opto/regalloc.hpp");
252 AD.addInclude(AD._HPP_file, "opto/subnode.hpp");
253 AD.addInclude(AD._HPP_file, "opto/vectornode.hpp");
254 AD.addInclude(AD._CPP_CLONE_file, "precompiled.hpp");
255 AD.addInclude(AD._CPP_CLONE_file, "adfiles", get_basename(AD._HPP_file._name));
256 AD.addInclude(AD._CPP_EXPAND_file, "precompiled.hpp");
257 AD.addInclude(AD._CPP_EXPAND_file, "adfiles", get_basename(AD._HPP_file._name));
258 AD.addInclude(AD._CPP_FORMAT_file, "precompiled.hpp");
259 AD.addInclude(AD._CPP_FORMAT_file, "adfiles", get_basename(AD._HPP_file._name));
260 AD.addInclude(AD._CPP_GEN_file, "precompiled.hpp");
261 AD.addInclude(AD._CPP_GEN_file, "adfiles", get_basename(AD._HPP_file._name));
262 AD.addInclude(AD._CPP_GEN_file, "opto/cfgnode.hpp");
263 AD.addInclude(AD._CPP_GEN_file, "opto/locknode.hpp");
264 AD.addInclude(AD._CPP_MISC_file, "precompiled.hpp");
265 AD.addInclude(AD._CPP_MISC_file, "adfiles", get_basename(AD._HPP_file._name));
266 AD.addInclude(AD._CPP_PEEPHOLE_file, "precompiled.hpp");
267 AD.addInclude(AD._CPP_PEEPHOLE_file, "adfiles", get_basename(AD._HPP_file._name));
268 AD.addInclude(AD._CPP_PIPELINE_file, "precompiled.hpp");
269 AD.addInclude(AD._CPP_PIPELINE_file, "adfiles", get_basename(AD._HPP_file._name));
270 AD.addInclude(AD._DFA_file, "precompiled.hpp");
271 AD.addInclude(AD._DFA_file, "adfiles", get_basename(AD._HPP_file._name));
272 AD.addInclude(AD._DFA_file, "opto/matcher.hpp");
273 AD.addInclude(AD._DFA_file, "opto/opcodes.hpp");
279 AD.addPreHeaderBlocks(AD._HPP_file._fp); // .hpp
280 AD.buildMachOperEnum(AD._HPP_file._fp); // .hpp
281 AD.buildMachOpcodesEnum(AD._HPP_file._fp); // .hpp
282 AD.buildMachRegisterNumbers(AD._VM_file._fp); // VM file
283 AD.buildMachRegisterEncodes(AD._HPP_file._fp); // .hpp file
284 AD.declareRegSizes(AD._HPP_file._fp); // .hpp
285 AD.build_pipeline_enums(AD._HPP_file._fp); // .hpp
287 AD.defineStateClass(AD._HPP_file._fp); // .hpp
289 AD.declareClasses(AD._HPP_file._fp);
291 AD.addSourceBlocks(AD._CPP_file._fp); // .cpp
292 AD.addHeaderBlocks(AD._HPP_file._fp); // .hpp
293 AD.buildReduceMaps(AD._HPP_file._fp, AD._CPP_file._fp);
294 AD.buildMustCloneMap(AD._HPP_file._fp, AD._CPP_file._fp);
296 AD.build_cisc_spill_instructions(AD._HPP_file._fp, AD._CPP_file._fp);
298 AD.defineClasses(AD._CPP_file._fp);
299 AD.buildMachOperGenerator(AD._CPP_GEN_file._fp);// .cpp
300 AD.buildMachNodeGenerator(AD._CPP_GEN_file._fp);// .cpp
302 AD.buildInstructMatchCheck(AD._CPP_file._fp); // .cpp
304 AD.buildFrameMethods(AD._CPP_file._fp); // .cpp
307 AD.addPreprocessorChecks(AD._CPP_file._fp); // .cpp
308 AD.addPreprocessorChecks(AD._CPP_CLONE_file._fp); // .cpp
309 AD.addPreprocessorChecks(AD._CPP_EXPAND_file._fp); // .cpp
310 AD.addPreprocessorChecks(AD._CPP_FORMAT_file._fp); // .cpp
311 AD.addPreprocessorChecks(AD._CPP_GEN_file._fp); // .cpp
312 AD.addPreprocessorChecks(AD._CPP_MISC_file._fp); // .cpp
313 AD.addPreprocessorChecks(AD._CPP_PEEPHOLE_file._fp); // .cpp
314 AD.addPreprocessorChecks(AD._CPP_PIPELINE_file._fp); // .cpp
317 AD.buildDFA(AD._DFA_file._fp);
319 AD.addIncludeGuardEnd(AD._HPP_file, "GENERATED_ADFILES_AD_HPP"); // .hpp
320 AD.addIncludeGuardEnd(AD._VM_file, "GENERATED_ADFILES_ADGLOBALS_HPP"); // .hpp
322 AD.close_files(0); // Close all input/output files
327 if( AD._dfa_debug & 2 ) { // For higher debug settings, print timing info
337 return (AD._syntax_errs + AD._semantic_errs + AD._internal_errs); // Bye Bye!!
341 static void usage(ArchDesc& AD)
353 printf(" c specify CPP file name (default: %s)\n", AD._CPP_file._name);
354 printf(" h specify HPP file name (default: %s)\n", AD._HPP_file._name);
471 // Get pointer to legal text at the beginning of AD file.
478 assert(legal_start[0] == '/' && legal_start[1] == '/', "Incorrect header of AD file");
480 assert(strncmp(legal_end, "// Copyright", 12) == 0, "Incorrect header of AD file");