From 26307319a3ce203b10e8a0fbdaf06c9f2347f1ca Mon Sep 17 00:00:00 2001 From: clc5q <clc5q@git.zephyr-software.com> Date: Mon, 7 Sep 2015 22:19:21 +0000 Subject: [PATCH] Print 64-bit address reg for SPARK Ada even when operand widths are 32 bits. Former-commit-id: 21f074ffaab5f05a95e8b7081fa8caff2bde0687 --- src/base/SMPInstr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/base/SMPInstr.cpp b/src/base/SMPInstr.cpp index ab2647e4..5525826a 100644 --- a/src/base/SMPInstr.cpp +++ b/src/base/SMPInstr.cpp @@ -359,6 +359,9 @@ void SMPInstr::PrintSPARKAdaOperand(const STARSOpndTypePtr &Opnd, FILE *OutFile, else { // no SIB info uint16_t BaseReg = Opnd->GetReg(); STARSOpndTypePtr BaseOp = this->STARSInstPtr->MakeRegOpnd(BaseReg); + if (this->MDIsAddressing64bit()) { + BaseOp->SetByteWidth(8); + } if (Opnd->HasSegReg() && (!((STARS_x86_R_ss == Opnd->GetSegReg()) && MDIsStackAccessOpnd(Opnd, UseFP)))) { // We have a segment selector that is not just a redundant SS: selector for an RSP-relative access. STARSOpndTypePtr SegRegOp = this->STARSInstPtr->MakeRegOpnd(Opnd->GetSegReg()); @@ -393,6 +396,9 @@ void SMPInstr::PrintSPARKAdaOperand(const STARSOpndTypePtr &Opnd, FILE *OutFile, else { uint16_t BaseReg = Opnd->GetReg(); STARSOpndTypePtr BaseOp = this->STARSInstPtr->MakeRegOpnd(BaseReg); + if (this->MDIsAddressing64bit()) { + BaseOp->SetByteWidth(8); + } if (Opnd->HasSegReg() && (!((STARS_x86_R_ss == Opnd->GetSegReg()) && MDIsStackAccessOpnd(Opnd, UseFP)))) { // We have a segment selector that is not just a redundant SS: selector for an RSP-relative access. STARSOpndTypePtr SegRegOp = this->STARSInstPtr->MakeRegOpnd(Opnd->GetSegReg()); -- GitLab