diff options
| author | Jimmy Kwa <[email protected]> | 2010-12-21 10:30:12 -0800 |
|---|---|---|
| committer | Jimmy Kwa <[email protected]> | 2010-12-21 10:30:12 -0800 |
| commit | d864c51b9fee6b2808e4752a556d6de4ba376b7c (patch) | |
| tree | b85f8dcb4467780a29006715bf7acc09e6860e6f /decuda_to_ptxplus/decudaInst.cc | |
| parent | 4bf50de083f2cf4e11c56d9e423cd7ccaf2c50e7 (diff) | |
added support for negative .f64 operands in decuda_to_ptxplus
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8289]
Diffstat (limited to 'decuda_to_ptxplus/decudaInst.cc')
| -rw-r--r-- | decuda_to_ptxplus/decudaInst.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/decuda_to_ptxplus/decudaInst.cc b/decuda_to_ptxplus/decudaInst.cc index 98e8a59..1bb5c8e 100644 --- a/decuda_to_ptxplus/decudaInst.cc +++ b/decuda_to_ptxplus/decudaInst.cc @@ -438,6 +438,17 @@ void decudaInst::printNewPtx() snprintf(newText,40,"{$r%u,$r%u,$r%u,$r%u}", regNumInt+0, regNumInt+1, regNumInt+2, regNumInt+3); currentPiece->stringText = newText; + } else if( modString[0] == '-' && modString[1] == '$' && modString[2] == 'r' ) { + strcpy(newText, modString); + strtok (newText, "r"); + regNumString = strtok (NULL, "r"); + regNumInt = atoi(regNumString); + if(vectorFlag ==1) + snprintf(newText,40,"-{$r%u,$r%u}", regNumInt+0, regNumInt+1); + if(vectorFlag ==2) + snprintf(newText,40,"-{$r%u,$r%u,$r%u,$r%u}", regNumInt+0, regNumInt+1, regNumInt+2, regNumInt+3); + + currentPiece->stringText = newText; } /*else if( modString[0] == '$' && modString[1] == 'o'&& modString[2] == 'f' ) { strcpy(newText, modString); strtok (newText, "s"); |
