Mercurial > hg-old > index.cgi
comparison lwasm/lwasm.c @ 357:0cf4948d53b4
Checkpoint - adding actual cpu instructions
author | lost@starbug |
---|---|
date | Wed, 31 Mar 2010 20:12:20 -0600 |
parents | 60568b123281 |
children | f50a54d0293a |
comparison
equal
deleted
inserted
replaced
356:7166254491ed | 357:0cf4948d53b4 |
---|---|
553 lwasm_emit(l, v); | 553 lwasm_emit(l, v); |
554 } | 554 } |
555 | 555 |
556 return 0; | 556 return 0; |
557 } | 557 } |
558 | |
559 int lwasm_lookupreg2(const char *regs, char **p) | |
560 { | |
561 int rval = 0; | |
562 | |
563 while (*regs) | |
564 { | |
565 if (toupper(**p) == *regs) | |
566 { | |
567 if (regs[1] == ' ' && !isalpha(*(*p + 1))) | |
568 break; | |
569 if (toupper(*(*p + 1)) == regs[1]) | |
570 break; | |
571 } | |
572 regs += 2; | |
573 rval++; | |
574 } | |
575 if (!*regs) | |
576 return -1; | |
577 if (regs[1] == ' ') | |
578 (*p)++; | |
579 else | |
580 (*p) += 2; | |
581 return rval; | |
582 } |