0, create_immed(b, dest_components), 0);
} else {
offset = ir3_get_src(ctx, &intr->src[1])[0];
+ if (ctx->compiler->gen >= 7) {
+ /* A7XX TODO: Move to NIR for it to be properly optimized? */
+ offset = ir3_SHL_B(b, offset, 0, create_immed(b, 2), 0);
+ }
load =
ir3_LDG_A(b, addr, 0, offset, 0, create_immed(b, 0), 0,
create_immed(b, 0), 0, create_immed(b, dest_components), 0);
create_immed(b, ncomp), 0);
} else {
offset = ir3_get_src(ctx, &intr->src[2])[0];
+ if (ctx->compiler->gen >= 7) {
+ /* A7XX TODO: Move to NIR for it to be properly optimized? */
+ offset = ir3_SHL_B(b, offset, 0, create_immed(b, 2), 0);
+ }
stg =
ir3_STG_A(b, addr, 0, offset, 0, create_immed(b, 0), 0,
create_immed(b, 0), 0, value, 0, create_immed(b, ncomp), 0);
new_src(0, IR3_REG_IMMED)->uim_val = $3 - 2;
new_src(0, IR3_REG_IMMED)->uim_val = $4;
}
-| '+' cat6_reg_or_immed
+| '+' cat6_reg_or_immed {
+ // Dummy src to smooth the difference between a6xx and a7xx
+ new_src(0, IR3_REG_IMMED)->uim_val = 0;
+ }
cat6_a6xx_global_address_pt2:
'(' src offset ')' '<' '<' integer {
<encode>
<map name="SRC2">src->srcs[1]</map>
<map name="OFF">extract_reg_uim(src->srcs[2])</map>
- <map name="SIZE">extract_reg_uim(src->srcs[3])</map>
+ <map name="SIZE">extract_reg_uim(src->srcs[4])</map>
<map name="SRC1_CONST">!!(src->srcs[0]->flags & IR3_REG_CONST)</map>
</encode>
</bitset>
<encode>
<map name="SRC2">src->srcs[1]</map>
<map name="OFF">extract_reg_uim(src->srcs[2])</map>
- <map name="SRC3">src->srcs[3]</map>
- <map name="SIZE">extract_reg_uim(src->srcs[4])</map>
+ <map name="SRC3">src->srcs[4]</map>
+ <map name="SIZE">extract_reg_uim(src->srcs[5])</map>
<map name="SRC1_CONST">!!(src->srcs[0]->flags & IR3_REG_CONST)</map>
</encode>
</bitset>