mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-24 05:47:35 -04:00
Merge Limvot's error check.
This commit is contained in:
commit
0646f7a2f3
1 changed files with 4 additions and 1 deletions
|
@ -331,7 +331,10 @@ Obj *AsmReader::read(std::istream &input) {
|
|||
break;
|
||||
case ASM_T_INST:
|
||||
if (state == ST_INIT) {
|
||||
Instruction::Opcode opc = opMap[yylval.s];
|
||||
map<string, Instruction::Opcode>::iterator opcIterator = opMap.find(yylval.s);
|
||||
if (opcIterator == opMap.end())
|
||||
asmReaderError(yyline, "Invalid Instruction");
|
||||
Instruction::Opcode opc = opcIterator->second;
|
||||
if (outstate != OS_TEXTCHUNK) {
|
||||
tc = new TextChunk(next_chunk_name, next_chunk_align,
|
||||
flagsToWord(permR, permW, permX));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue