summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-03-23 22:06:07 +0000
committerHal Finkel <hfinkel@anl.gov>2013-03-23 22:06:07 +0000
commit915769edd91b7f26b76d4107eda47be2a562295b (patch)
tree94f44bf10783ceeeb65a76a2fdde43768b422c39 /llvm
parentcc1eeda16d5cb9ef37d3ffa226b8c0ff3616e2ca (diff)
downloadbcm5719-llvm-915769edd91b7f26b76d4107eda47be2a562295b.tar.gz
bcm5719-llvm-915769edd91b7f26b76d4107eda47be2a562295b.zip
PPC ZERO register needs a register number of 0.
In order for the new ZERO register to be used with MC, etc. we need to specify its register number (0). Thanks to Kai for reporting the problem! llvm-svn: 177833
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h
index 9c975c089ea..068473af179 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h
@@ -28,6 +28,7 @@ inline static unsigned getPPCRegisterNumbering(unsigned RegEnum) {
using namespace PPC;
switch (RegEnum) {
case 0: return 0;
+ case ZERO : case ZERO8 :
case R0 : case X0 : case F0 : case V0 : case CR0: case CR0LT: return 0;
case R1 : case X1 : case F1 : case V1 : case CR1: case CR0GT: return 1;
case R2 : case X2 : case F2 : case V2 : case CR2: case CR0EQ: return 2;
OpenPOWER on IntegriCloud