0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-11-08 23:27:15 -05:00

Fix matching of branch instructions with prefixes and sizes

Matching of branch instructions with prefixes and sizes is, to say the
least, tricky. Work through it, and add a new macro to help.

Fixes: https://github.com/netwide-assembler/nasm/issues/144
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel)
2025-10-10 13:03:33 -07:00
parent 2c71e67762
commit a7457e66cf
22 changed files with 6875 additions and 100 deletions

View File

@@ -8,5 +8,5 @@
}
}
],
"error": "over"
"update": false
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3297
travis/test/jmpxx.asm Normal file

File diff suppressed because it is too large Load Diff

76
travis/test/jmpxx.json Normal file
View File

@@ -0,0 +1,76 @@
[
{
"description": "Test combinations of jump instructions (-Ox, 16 bits)",
"id": "jmpxx",
"format": "bin",
"source": "jmpxx.asm",
"option": "--bits 16 -Ox",
"target": [
{ "output": "jmpxx-ox.bin16" }
]
},
{
"description": "Test combinations of jump instructions (-O0, 16 bits)",
"ref": "jmpxx",
"option": "--bits 16 -O0",
"target": [
{ "output": "jmpxx-o0.bin16" }
]
},
{
"description": "Test combinations of jump instructions (-O1, 16 bits)",
"ref": "jmpxx",
"option": "--bits 16 -O1",
"target": [
{ "output": "jmpxx-o1.bin16" }
]
},
{
"description": "Test combinations of jump instructions (-Ox, 32 bits)",
"ref": "jmpxx",
"option": "--bits 32 -Ox",
"target": [
{ "output": "jmpxx-ox.bin32" }
]
},
{
"description": "Test combinations of jump instructions (-O0, 32 bits)",
"ref": "jmpxx",
"option": "--bits 32 -O0",
"target": [
{ "output": "jmpxx-o0.bin32" }
]
},
{
"description": "Test combinations of jump instructions (-O1, 32 bits)",
"ref": "jmpxx",
"option": "--bits 32 -O1",
"target": [
{ "output": "jmpxx-o1.bin32" }
]
},
{
"description": "Test combinations of jump instructions (-Ox, 64 bits)",
"ref": "jmpxx",
"option": "--bits 64 -Ox",
"target": [
{ "output": "jmpxx-ox.bin64" }
]
},
{
"description": "Test combinations of jump instructions (-O0, 64 bits)",
"ref": "jmpxx",
"option": "--bits 64 -O0",
"target": [
{ "output": "jmpxx-o0.bin64" }
]
},
{
"description": "Test combinations of jump instructions (-O1, 64 bits)",
"ref": "jmpxx",
"option": "--bits 64 -O1",
"target": [
{ "output": "jmpxx-o1.bin64" }
]
}
]