comparison src/share/vm/adlc/adlparse.cpp @ 6179:8c92982cbbc4

7119644: Increase superword's vector size up to 256 bits Summary: Increase vector size up to 256-bits for YMM AVX registers on x86. Reviewed-by: never, twisti, roland
author kvn
date Fri, 15 Jun 2012 01:25:19 -0700
parents db2e64ca2d5a
children d336b3173277
comparison
equal deleted inserted replaced
6146:eba1d5bce9e8 6179:8c92982cbbc4
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
113 else if (!strcmp(ident, "#undef")) preproc_undef(); 113 else if (!strcmp(ident, "#undef")) preproc_undef();
114 else { 114 else {
115 parse_err(SYNERR, "expected one of - instruct, operand, ins_attrib, op_attrib, source, register, pipeline, encode\n Found %s",ident); 115 parse_err(SYNERR, "expected one of - instruct, operand, ins_attrib, op_attrib, source, register, pipeline, encode\n Found %s",ident);
116 } 116 }
117 } 117 }
118 // Add reg_class spill_regs after parsing.
119 RegisterForm *regBlock = _AD.get_registers();
120 if (regBlock == NULL) {
121 parse_err(SEMERR, "Did not declare 'register' definitions");
122 }
123 regBlock->addSpillRegClass();
118 124
119 // Done with parsing, check consistency. 125 // Done with parsing, check consistency.
120 126
121 if (_preproc_depth != 0) { 127 if (_preproc_depth != 0) {
122 parse_err(SYNERR, "End of file inside #ifdef"); 128 parse_err(SYNERR, "End of file inside #ifdef");
766 } 772 }
767 } 773 }
768 774
769 //------------------------------reg_parse-------------------------------------- 775 //------------------------------reg_parse--------------------------------------
770 void ADLParser::reg_parse(void) { 776 void ADLParser::reg_parse(void) {
771 777 RegisterForm *regBlock = _AD.get_registers(); // Information about registers encoding
772 // Create the RegisterForm for the architecture description. 778 if (regBlock == NULL) {
773 RegisterForm *regBlock = new RegisterForm(); // Build new Source object 779 // Create the RegisterForm for the architecture description.
774 regBlock->_linenum = linenum(); 780 regBlock = new RegisterForm(); // Build new Source object
775 _AD.addForm(regBlock); 781 _AD.addForm(regBlock);
782 }
776 783
777 skipws(); // Skip leading whitespace 784 skipws(); // Skip leading whitespace
778 if (_curchar == '%' && *(_ptr+1) == '{') { 785 if (_curchar == '%' && *(_ptr+1) == '{') {
779 next_char(); next_char(); // Skip "%{" 786 next_char(); next_char(); // Skip "%{"
780 skipws(); 787 skipws();
794 } 801 }
795 else { 802 else {
796 parse_err(SYNERR, "Missing %c{ ... %c} block after register keyword.\n",'%','%'); 803 parse_err(SYNERR, "Missing %c{ ... %c} block after register keyword.\n",'%','%');
797 return; 804 return;
798 } 805 }
799
800 // Add reg_class spill_regs
801 regBlock->addSpillRegClass();
802 } 806 }
803 807
804 //------------------------------encode_parse----------------------------------- 808 //------------------------------encode_parse-----------------------------------
805 void ADLParser::encode_parse(void) { 809 void ADLParser::encode_parse(void) {
806 EncodeForm *encBlock; // Information about instruction/operand encoding 810 EncodeForm *encBlock; // Information about instruction/operand encoding
807 char *desc = NULL; // String representation of encode rule
808 811
809 _AD.getForm(&encBlock); 812 _AD.getForm(&encBlock);
810 if ( encBlock == NULL) { 813 if ( encBlock == NULL) {
811 // Create the EncodeForm for the architecture description. 814 // Create the EncodeForm for the architecture description.
812 encBlock = new EncodeForm(); // Build new Source object 815 encBlock = new EncodeForm(); // Build new Source object