Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tiger
nolimips
Commits
2bdbc88d
Commit
2bdbc88d
authored
Jul 29, 2003
by
Benoit Perrot
Browse files
Specify instruction kind.
parent
04a80fcd
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
2bdbc88d
2003-07-29 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy.xml, dev/mips.py:
Specify instruction kind.
2003-07-29 Benot Perrot <benoit@lrde.epita.fr>
* dev/mipsy-scanner-gen.py,
...
...
dev/mipsy.py
View file @
2bdbc88d
...
...
@@ -157,9 +157,10 @@ class SyntaxBuilder:
## -------------------------------------
class
Instruction
:
def
__init__
(
self
,
opcode
,
level
,
format
,
syntaxes
):
def
__init__
(
self
,
opcode
,
level
,
kind
,
format
,
syntaxes
):
self
.
opcode
=
opcode
self
.
level
=
level
self
.
kind
=
kind
self
.
format
=
format
self
.
syntaxes
=
syntaxes
...
...
@@ -175,6 +176,7 @@ class InstructionBuilder:
def
reset
(
self
):
self
.
opcode
=
""
self
.
level
=
""
self
.
kind
=
""
self
.
format
=
Format
(
""
)
self
.
syntaxes
=
[]
def
__init__
(
self
):
...
...
@@ -184,12 +186,15 @@ class InstructionBuilder:
self
.
opcode
=
opcode
def
set_level
(
self
,
level
):
self
.
level
=
level
def
set_kind
(
self
,
kind
):
self
.
kind
=
kind
def
set_format
(
self
,
format
):
self
.
format
=
format
def
add_syntax
(
self
,
syntax
):
self
.
syntaxes
.
append
(
syntax
)
def
get
(
self
):
return
Instruction
(
self
.
opcode
,
self
.
level
,
self
.
format
,
self
.
syntaxes
)
return
Instruction
(
self
.
opcode
,
self
.
level
,
self
.
kind
,
self
.
format
,
self
.
syntaxes
)
## -------------------------------------
...
...
@@ -205,6 +210,7 @@ class InstructionSetHandler(ContentHandler):
self
.
ib
.
reset
()
self
.
ib
.
set_opcode
(
attrs
[
"opcode"
])
self
.
ib
.
set_level
(
attrs
[
"level"
])
self
.
ib
.
set_kind
(
attrs
[
"kind"
])
elif
name
==
"format"
:
self
.
fb
=
FormatBuilder
()
elif
name
==
"syntax"
:
...
...
dev/mipsy.xml
View file @
2bdbc88d
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment