mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-24 07:52:38 +00:00
[gamecode] Add single-component float bitop instructions
These add legacy support for basic float bitops (& | ^ ~). Avoiding the instructions would require tot only the source to be converted, but also the servers (as they do access those fields), and this seemed to be too much.
This commit is contained in:
parent
7c6ef06dfb
commit
eba614336d
2 changed files with 32 additions and 2 deletions
|
@ -31,7 +31,7 @@ bitmap_txt = """
|
|||
1 1110 c111 stated
|
||||
1 1111 00mm lea
|
||||
1 1111 01td vecops2
|
||||
1 1111 10nn
|
||||
1 1111 10oo fbitops
|
||||
1 1111 1100 convert (conversion mode in st->b)
|
||||
1 1111 1101 with (mode in st->a, value in st->b, reg in st->c)
|
||||
1 1111 1110
|
||||
|
@ -186,6 +186,24 @@ convert_formats = {
|
|||
"widths": "-1, 0, -1",
|
||||
"types": "ev_void, ev_short, ev_void",
|
||||
}
|
||||
fbitops_formats = {
|
||||
"opcode": "OP_{op_fbit[oo].upper()}_F",
|
||||
"mnemonic": "{op_fbit[oo]}.f",
|
||||
"opname": "{op_fbit[oo]}",
|
||||
"format": "{fbit_fmt[oo]}",
|
||||
"widths": "1, 1, 1",
|
||||
"types": "{fbit_types[0]}, {fbit_types[oo==3]}, {fbit_types[0]}",
|
||||
"args": {
|
||||
"op_fbit": ["bitand", "bitor", "bitxor", "bitnot"],
|
||||
"fbit_types": ["ev_float", "ev_invalid"],
|
||||
"fbit_fmt": [
|
||||
"%Ga, %Gb, %gc",
|
||||
"%Ga, %Gb, %gc",
|
||||
"%Ga, %Gb, %gc",
|
||||
"%Ga, %gc",
|
||||
],
|
||||
},
|
||||
}
|
||||
hops_formats = {
|
||||
"opcode": "OP_HOPS",
|
||||
"mnemonic": "hops",
|
||||
|
@ -548,6 +566,7 @@ group_map = {
|
|||
"compare2": compare2_formats,
|
||||
"constant": constant_formats,
|
||||
"convert": convert_formats,
|
||||
"fbitops": fbitops_formats,
|
||||
"hops": hops_formats,
|
||||
"jump": jump_formats,
|
||||
"lea": lea_formats,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue