mirror of
https://github.com/digarok/gsplus.git
synced 2024-06-15 10:29:29 +00:00
add BLT/BGE aliases.
This commit is contained in:
parent
4c55800e23
commit
bd53440610
|
@ -68,7 +68,7 @@ enum {
|
||||||
MLI_CALL
|
MLI_CALL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define CC3(a) ((a[0] << 16) | (a[1] << 8) | a[2])
|
||||||
struct mnemonic_entry {
|
struct mnemonic_entry {
|
||||||
const char *name;
|
const char *name;
|
||||||
int value;
|
int value;
|
||||||
|
@ -76,7 +76,7 @@ struct mnemonic_entry {
|
||||||
};
|
};
|
||||||
struct mnemonic_entry mnemonic_table[] = {
|
struct mnemonic_entry mnemonic_table[] = {
|
||||||
{ NULL, 0 },
|
{ NULL, 0 },
|
||||||
#define x(a) { #a, (#a[0] << 16)| (#a[1] << 8) | (#a[2]), a },
|
#define x(a) { #a, CC3(#a), a },
|
||||||
#include "mnemonics.x"
|
#include "mnemonics.x"
|
||||||
#undef x
|
#undef x
|
||||||
};
|
};
|
||||||
|
@ -553,6 +553,10 @@ static const char *parse_opcode(const char *cp, struct cookie *cookie) {
|
||||||
e = bsearch((void *)(uintptr_t)tmp, mnemonic_table,
|
e = bsearch((void *)(uintptr_t)tmp, mnemonic_table,
|
||||||
sizeof(mnemonic_table) / sizeof(mnemonic_table[0]),
|
sizeof(mnemonic_table) / sizeof(mnemonic_table[0]),
|
||||||
sizeof(mnemonic_table[0]), mnemonic_cmp);
|
sizeof(mnemonic_table[0]), mnemonic_cmp);
|
||||||
|
if (e == NULL) {
|
||||||
|
if (tmp == CC3("BLT")) e = &mnemonic_table[BCC];
|
||||||
|
if (tmp == CC3("BGE")) e = &mnemonic_table[BCS];
|
||||||
|
}
|
||||||
if (!e) return NULL;
|
if (!e) return NULL;
|
||||||
cookie->mnemonic = e->mnemonic;
|
cookie->mnemonic = e->mnemonic;
|
||||||
cookie->mode = IMPLIED;
|
cookie->mode = IMPLIED;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user