mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7061101: adlc should complain about mixing block and expression forms of ins_encode
Reviewed-by: kvn
This commit is contained in:
parent
2337123692
commit
d23654d851
1 changed files with 14 additions and 0 deletions
|
@ -2812,6 +2812,13 @@ void ADLParser::ins_encode_parse_block(InstructForm& inst) {
|
||||||
params->add_entry(param);
|
params->add_entry(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for duplicate ins_encode sections after parsing the block
|
||||||
|
// so that parsing can continue and find any other errors.
|
||||||
|
if (inst._insencode != NULL) {
|
||||||
|
parse_err(SYNERR, "Multiple ins_encode sections defined\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Set encode class of this instruction.
|
// Set encode class of this instruction.
|
||||||
inst._insencode = encrule;
|
inst._insencode = encrule;
|
||||||
}
|
}
|
||||||
|
@ -3044,6 +3051,13 @@ void ADLParser::ins_encode_parse(InstructForm& inst) {
|
||||||
next_char(); // move past ';'
|
next_char(); // move past ';'
|
||||||
skipws(); // be friendly to oper_parse()
|
skipws(); // be friendly to oper_parse()
|
||||||
|
|
||||||
|
// Check for duplicate ins_encode sections after parsing the block
|
||||||
|
// so that parsing can continue and find any other errors.
|
||||||
|
if (inst._insencode != NULL) {
|
||||||
|
parse_err(SYNERR, "Multiple ins_encode sections defined\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Debug Stuff
|
// Debug Stuff
|
||||||
if (_AD._adl_debug > 1) fprintf(stderr,"Instruction Encode: %s\n", ec_name);
|
if (_AD._adl_debug > 1) fprintf(stderr,"Instruction Encode: %s\n", ec_name);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue