annotate lwasm/insn_inh.c @ 346:a82c55070624

Added expression parsing infrastructure and misc fixes
author lost@starbug
date Sat, 27 Mar 2010 19:04:03 -0600
parents
children 11a95c6414b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
346
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
1 /*
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
2 insn_inh.c
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
3 Copyright © 2010 William Astle
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
4
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
5 This file is part of LWASM.
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
6
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
7 LWASM is free software: you can redistribute it and/or modify it under the
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
8 terms of the GNU General Public License as published by the Free Software
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
9 Foundation, either version 3 of the License, or (at your option) any later
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
10 version.
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
11
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
12 This program is distributed in the hope that it will be useful, but WITHOUT
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
15 more details.
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
16
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
17 You should have received a copy of the GNU General Public License along with
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
18 this program. If not, see <http://www.gnu.org/licenses/>.
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
19
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
20 */
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
21
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
22 #include <config.h>
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
23
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
24 #include "lwasm.h"
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
25 #include "instab.h"
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
26
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
27 PARSEFUNC(insn_parse_inh)
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
28 {
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
29 l -> len = OPLEN(instab[l -> insn].ops[0]);
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
30 }
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
31
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
32 RESOLVEFUNC(insn_resolve_inh)
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
33 {
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
34 lwasm_emitop(l, instab[l -> insn].ops[0]);
a82c55070624 Added expression parsing infrastructure and misc fixes
lost@starbug
parents:
diff changeset
35 }