Skip to content

Commit ae8ed2a

Browse files
committed
Fix: Typo in grammar
1 parent db5b9d7 commit ae8ed2a

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

smalig/grammar.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
long_desc: "Moves the literal value BBBB0000 into vAA. BBBB is right-zero-extended to 32 bits. The value of BBBB is in the range -32768 to 32767 (-0x80000000 to 0x7FFF0000)."
282282
note: "Generaly used to initialise float values."
283283
example: "1500 2041 - const/high16 v0, 0x41200000 (#float 10.0)"
284-
example_disc: "Moves the floating literal value 0x41200000(10.0) into v0. The 16 bit literal in the instruction carries the top 16 bits of the floating point number."
284+
example_desc: "Moves the floating literal value 0x41200000(10.0) into v0. The 16 bit literal in the instruction carries the top 16 bits of the floating point number."
285285

286286
- opcode: "16"
287287
name: "const-wide/16"
@@ -293,7 +293,7 @@
293293
long_desc: "Moves the literal value BBBB into register-pair (vAA, vAA+1), expanding the integer constant into a long constant. BBBB is sign-extended to 64 bits. The value of BBBB is in the range -32768 to 32767 (-0x8000 to 0x7FFF)."
294294
note: ""
295295
example: "1600 0A00 - const-wide/16 v0, 0xa (#long 10.0)"
296-
example_disc: "Moves the long literal value 0xa(10) into (v0,v1) register-pair."
296+
example_desc: "Moves the long literal value 0xa(10) into (v0,v1) register-pair."
297297

298298
- opcode: "17"
299299
name: "const-wide/32"
@@ -305,7 +305,7 @@
305305
long_desc: "Moves the literal value BBBBBBBB into register-pair (vAA, vAA+1), expanding the integer constant into a long constant. BBBBBBBB is sign-extended to 64 bits. The value of BBBBBBBB is in the range -2147483648 to 2147483647 (-0x80000000 to 0x7FFFFFFF)."
306306
note: ""
307307
example: "1702 4E61 BC00 - const-wide/32 v2, 0x00bc614e"
308-
example_disc: "Moves the long literal value 0x00bc614e into (v2,v3) register-pair."
308+
example_desc: "Moves the long literal value 0x00bc614e into (v2,v3) register-pair."
309309

310310
- opcode: "18"
311311
name: "const-wide"
@@ -317,7 +317,7 @@
317317
long_desc: "Moves the literal value constant BBBBBBBBBBBBBBBB into register-pair (vAA, vAA+1). The value of BBBBBBBBBBBBBBBB is in the range -9223372036854775808 to 9223372036854775807 (-0x8000000000000000 to 0x7FFFFFFFFFFFFFFF)."
318318
note: ""
319319
example: "1802 874b 6b5d 54dc 2b00- const-wide v2, 0x002bdc545d6b4b87 (#long 12345678901234567)"
320-
example_disc: "Moves the long literal value 0x002bdc545d6b4b87 into (v2,v3) register-pair."
320+
example_desc: "Moves the long literal value 0x002bdc545d6b4b87 into (v2,v3) register-pair."
321321

322322
- opcode: "19"
323323
name: "const-wide/high16"
@@ -329,7 +329,7 @@
329329
long_desc: "Moves the literal value BBBB into register-pair (vAA, vAA+1). BBBB is right-zero-extended to 64 bits. The value of BBBB is in the range -32768 to 32767 (-0x8000 to 0x7FFF)."
330330
note: "Generaly used to initialise double values."
331331
example: "1900 2440 - const-wide/high16 v0, 0x402400000 (#double 10.0)"
332-
example_disc: "Moves the double literal value 10.0 into (v0,v1) register-pair."
332+
example_desc: "Moves the double literal value 10.0 into (v0,v1) register-pair."
333333

334334
- opcode: "28"
335335
name: "goto"

smalig/utils/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def __init__(self, instructions: list[dict], target: str, exact_match: bool = Tr
3939

4040
def __str__(self):
4141
if isinstance(self.result, dict):
42+
if not self.result:
43+
results = f"No instruction found for {self.target}!"
44+
return results
4245
results = f"Opcode: {self.result['opcode']}\n"
4346
results += f"Name: {self.result['name']}\n"
4447
results += f"Format: {self.result['format']}\n"

0 commit comments

Comments
 (0)