summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-08-31 11:29:49 -0400
committerTom Stellard <[email protected]>2012-08-31 12:54:58 -0400
commit022f6d88616bf5ea3903c5056d6147e9cf356aa9 (patch)
treecd93db13aa7434b8b09d8900bec327906a27bfd1 /src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp
parent1cee70c5d836ee4c3981910ee46ed9d7471d39d8 (diff)
radeon/llvm: Rework how immediate operands are handled with SI
Immediate operands were previously handled in the CodeEmitter, but that code was buggy and very confusing. This commit adds a pass that simplifies the handling of immediate operands by spliting the loading of the immediate into a sperate insruction that is bundled with the original.
Diffstat (limited to 'src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp')
-rw-r--r--src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp b/src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp
index bf3d89c1b83..2d6c86d9d20 100644
--- a/src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp
+++ b/src/gallium/drivers/radeon/AMDGPUAsmPrinter.cpp
@@ -81,9 +81,13 @@ void AMDGPUAsmPrinter::EmitProgramInfo(MachineFunction &MF) {
VCCUsed = true;
continue;
}
- if (reg == AMDGPU::EXEC) {
+ switch (reg) {
+ default: break;
+ case AMDGPU::EXEC:
+ case AMDGPU::SI_LITERAL_CONSTANT:
continue;
}
+
if (AMDGPU::SReg_32RegClass.contains(reg)) {
isSGPR = true;
width = 1;