Skip to content
Snippets Groups Projects
Commit f2778ed2 authored by Karol Herbst's avatar Karol Herbst :crab: Committed by Juan A. Suárez
Browse files

nvir/nvc0: fix legalizing of ld unlock c0[0x10000]


We have to increase the file index also for 0x10000 not just for values
greater than 0x10000.

Fixes: 37b67db6
Signed-off-by: Karol Herbst's avatarKarol Herbst <kherbst@redhat.com>
Reviewed-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 7319311a)
parent b22c5df1
No related branches found
No related tags found
No related merge requests found
......@@ -745,7 +745,7 @@ NVC0LegalizePostRA::visit(BasicBlock *bb)
} else
if (i->op == OP_LOAD && i->subOp == NV50_IR_SUBOP_LDC_IS) {
int offset = i->src(0).get()->reg.data.offset;
if (abs(offset) > 0x10000)
if (abs(offset) >= 0x10000)
i->src(0).get()->reg.fileIndex += offset >> 16;
i->src(0).get()->reg.data.offset = (int)(short)offset;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment