(Y ? BIFROST_ADD_OP_FRCP_FAST_F16_Y :
BIFROST_ADD_OP_FRCP_FAST_F16_X) :
BIFROST_ADD_OP_FRCP_FAST_F32;
- } else {
+ } else if (ins->op.special == BI_SPECIAL_FRSQ) {
op = fp16 ?
(Y ? BIFROST_ADD_OP_FRSQ_FAST_F16_Y :
BIFROST_ADD_OP_FRSQ_FAST_F16_X) :
BIFROST_ADD_OP_FRSQ_FAST_F32;
+ } else if (ins->op.special == BI_SPECIAL_EXP2_LOW) {
+ assert(!fp16);
+ op = BIFROST_ADD_OP_FEXP2_FAST;
+ } else {
+ unreachable("Unknown special op");
}
return bi_pack_add_1src(ins, regs, op);
#define BIFROST_ADD_OP_FRSQ_FAST_F16_X (0x0ce50)
#define BIFROST_ADD_OP_FRSQ_FAST_F16_Y (0x0ce70)
#define BIFROST_ADD_OP_LOG2_HELP (0x0cc68)
+#define BIFROST_ADD_OP_FEXP2_FAST (0x0cd58)
struct bifrost_add_inst {
unsigned src0 : 3;
{ 0x0cc00, "FRCP_FAST.f32", ADD_ONE_SRC },
{ 0x0cc20, "FRSQ_FAST.f32", ADD_ONE_SRC },
{ 0x0cc68, "FLOG2_U.f32", ADD_ONE_SRC },
+ { 0x0cd58, "FEXP2_FAST.f32", ADD_ONE_SRC },
{ 0x0ce00, "FRCP_TABLE", ADD_ONE_SRC },
{ 0x0ce10, "FRCP_FAST.f16.X", ADD_ONE_SRC },
{ 0x0ce20, "FRSQ_TABLE", ADD_ONE_SRC },