Commit 36e6d8f6 authored by Connor Abbott's avatar Connor Abbott Committed by Lyude Paul

bifrost/asm: Fix some reciprocal opcodes

This info comes from using this assembler + shader_runner.
parent 9e2069ee
......@@ -275,9 +275,9 @@ class fma:
#
# This computes x1.
"LOG_FREXPM" : SrcOpParser("LOG_FREXPM", 0xe0345, 1),
"FRCP_TABLE" : SrcOpParser("FRCP_TABLE", 0xe0365, 1),
"FRCP_FREXPM" : SrcOpParser("FRCP_FREXPM", 0xe0365, 1),
# Compute required exponent for reciprocal (negate it, accounting for the offset.)
"FRCP_EXP" : SrcOpParser("FRCP_EXP", 0xe038d, 1),
"FRCP_FREXPE" : SrcOpParser("FRCP_FREXPE", 0xe038d, 1),
"LOG_FREXPE" : SrcOpParser("LOG_FREXPE", 0xe03c5, 1),
"IMAX3" : SrcOpParser("IMAX3", 0xe0b80, 3),
"UMAX3" : SrcOpParser("UMAX3", 0xe0bc0, 3),
......@@ -448,7 +448,7 @@ class add:
# this seems to be the canonical way the blob generates a MOV.
"MOV" : SrcOpParser("MOV", 0x07b2d, 1),
"SWZ.YY.v2i16" : SrcOpParser("SWZ.YY.v2i16", 0x07b2f, 1),
"FRCP_EXP" : SrcOpParser("FRCP_EXP", 0x07b8d, 1),
"FRCP_FREXPE" : SrcOpParser("FRCP_FREXPE", 0x07b8d, 1),
# From the ARM patent US20160364209A1:
# "Decompose v (the input) into numbers x1 and s such that v = x1 * 2^s,
# and x1 is a floating point value in a predetermined range where the
......@@ -495,7 +495,10 @@ class add:
# Does not exist on G71 (added to G51, G72, and everything after)
"FRCP_FAST.f32" : SrcOpParser("FRCP_FAST.f32", 0x0cc00, 1),
# Produce appropriate scale
"FRCP_SCALE" : SrcOpParser("FRCP_SCALE", 0x0ce00, 1),
# Given a floating point number m * 2^e, produces a table-based
# approximation of 2/m using the top 17 bits. Includes special cases for
# infinity, NaN, and zero, and copies the sign bit.
"FRCP_TABLE" : SrcOpParser("FRCP_TABLE", 0x0ce00, 1),
# Used in the argument reduction for log.
# See the ARM patent for more information.
"FRCP_APPROX" : SrcOpParser("FRCP_APPROX", 0x0ce60, 1),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment