src/share/vm/adlc/adlparse.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/adlc/adlparse.cpp	Sat Jun  2 20:04:05 2012
--- new/src/share/vm/adlc/adlparse.cpp	Sat Jun  2 20:04:05 2012

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 113,122 **** --- 113,128 ---- else if (!strcmp(ident, "#undef")) preproc_undef(); else { parse_err(SYNERR, "expected one of - instruct, operand, ins_attrib, op_attrib, source, register, pipeline, encode\n Found %s",ident); } } + // Add reg_class spill_regs after parsing. + RegisterForm *regBlock = _AD.get_registers(); + if (regBlock == NULL) { + parse_err(SEMERR, "Did not declare 'register' definitions"); + } + regBlock->addSpillRegClass(); // Done with parsing, check consistency. if (_preproc_depth != 0) { parse_err(SYNERR, "End of file inside #ifdef");
*** 766,780 **** --- 772,787 ---- } } //------------------------------reg_parse-------------------------------------- void ADLParser::reg_parse(void) { + RegisterForm *regBlock = _AD.get_registers(); // Information about registers encoding + if (regBlock == NULL) { // Create the RegisterForm for the architecture description. ! RegisterForm *regBlock = new RegisterForm(); // Build new Source object regBlock->_linenum = linenum(); ! regBlock = new RegisterForm(); // Build new Source object _AD.addForm(regBlock); + } skipws(); // Skip leading whitespace if (_curchar == '%' && *(_ptr+1) == '{') { next_char(); next_char(); // Skip "%{" skipws();
*** 794,812 **** --- 801,815 ---- } else { parse_err(SYNERR, "Missing %c{ ... %c} block after register keyword.\n",'%','%'); return; } // Add reg_class spill_regs regBlock->addSpillRegClass(); } //------------------------------encode_parse----------------------------------- void ADLParser::encode_parse(void) { EncodeForm *encBlock; // Information about instruction/operand encoding char *desc = NULL; // String representation of encode rule _AD.getForm(&encBlock); if ( encBlock == NULL) { // Create the EncodeForm for the architecture description. encBlock = new EncodeForm(); // Build new Source object

src/share/vm/adlc/adlparse.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File