diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2012-07-21 03:09:04 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-07-21 03:09:04 +0000 |
| commit | 6035fe78c79193e2d50f9dfad0cdb85c67817579 (patch) | |
| tree | 0fa7a02aaa8e503cb9d8a5040271b91cf058ea66 /llvm/lib/Target/Mips | |
| parent | b49c68a65dba24c30bebfff16f859cb6b71b8f87 (diff) | |
| download | bcm5719-llvm-6035fe78c79193e2d50f9dfad0cdb85c67817579.tar.gz bcm5719-llvm-6035fe78c79193e2d50f9dfad0cdb85c67817579.zip | |
Add HIGHER and HIGHEST relocations to Mips backend.
llvm-svn: 160599
Diffstat (limited to 'llvm/lib/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h | 5 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsMCInstLower.cpp | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp b/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp index 227fd387f2c..b38463de4bf 100644 --- a/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp +++ b/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp @@ -126,6 +126,8 @@ static void printExpr(const MCExpr *Expr, raw_ostream &OS) { case MCSymbolRefExpr::VK_Mips_GOT_DISP: OS << "%got_disp("; break; case MCSymbolRefExpr::VK_Mips_GOT_PAGE: OS << "%got_page("; break; case MCSymbolRefExpr::VK_Mips_GOT_OFST: OS << "%got_ofst("; break; + case MCSymbolRefExpr::VK_Mips_HIGHER: OS << "%higher("; break; + case MCSymbolRefExpr::VK_Mips_HIGHEST: OS << "%highest("; break; } OS << SRE->getSymbol(); diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h b/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h index fb1c5ce6b6c..f7aedd02068 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h @@ -79,7 +79,10 @@ namespace MipsII { MO_GPOFF_LO, MO_GOT_DISP, MO_GOT_PAGE, - MO_GOT_OFST + MO_GOT_OFST, + + MO_HIGHER, + MO_HIGHEST }; enum { diff --git a/llvm/lib/Target/Mips/MipsMCInstLower.cpp b/llvm/lib/Target/Mips/MipsMCInstLower.cpp index c49d5308a5b..d4c5e6dd74c 100644 --- a/llvm/lib/Target/Mips/MipsMCInstLower.cpp +++ b/llvm/lib/Target/Mips/MipsMCInstLower.cpp @@ -61,6 +61,8 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO, case MipsII::MO_GOT_DISP: Kind = MCSymbolRefExpr::VK_Mips_GOT_DISP; break; case MipsII::MO_GOT_PAGE: Kind = MCSymbolRefExpr::VK_Mips_GOT_PAGE; break; case MipsII::MO_GOT_OFST: Kind = MCSymbolRefExpr::VK_Mips_GOT_OFST; break; + case MipsII::MO_HIGHER: Kind = MCSymbolRefExpr::VK_Mips_HIGHER; break; + case MipsII::MO_HIGHEST: Kind = MCSymbolRefExpr::VK_Mips_HIGHEST; break; } switch (MOTy) { |

