summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp')
-rw-r--r--llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
index 4016773e9b4..2d9dd4f8f83 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
@@ -265,15 +265,19 @@ void AVRAsmBackend::adjustFixupValue(const MCFixup &Fixup,
adjust::ldi::fixup(Size, Fixup, Value, Ctx);
break;
case AVR::fixup_lo8_ldi:
+ adjust::ldi::lo8(Size, Fixup, Value, Ctx);
+ break;
case AVR::fixup_lo8_ldi_pm:
- if (Kind == AVR::fixup_lo8_ldi_pm) adjust::pm(Value);
-
+ case AVR::fixup_lo8_ldi_gs:
+ adjust::pm(Value);
adjust::ldi::lo8(Size, Fixup, Value, Ctx);
break;
case AVR::fixup_hi8_ldi:
+ adjust::ldi::hi8(Size, Fixup, Value, Ctx);
+ break;
case AVR::fixup_hi8_ldi_pm:
- if (Kind == AVR::fixup_hi8_ldi_pm) adjust::pm(Value);
-
+ case AVR::fixup_hi8_ldi_gs:
+ adjust::pm(Value);
adjust::ldi::hi8(Size, Fixup, Value, Ctx);
break;
case AVR::fixup_hh8_ldi:
@@ -316,6 +320,13 @@ void AVRAsmBackend::adjustFixupValue(const MCFixup &Fixup,
Value &= 0xffff;
break;
+ case AVR::fixup_16_pm:
+ Value >>= 1; // Flash addresses are always shifted.
+ adjust::unsigned_width(16, Value, std::string("port number"), Fixup, Ctx);
+
+ Value &= 0xffff;
+ break;
+
case AVR::fixup_6_adiw:
adjust::fixup_6_adiw(Fixup, Value, Ctx);
break;
@@ -329,6 +340,7 @@ void AVRAsmBackend::adjustFixupValue(const MCFixup &Fixup,
break;
// Fixups which do not require adjustments.
+ case FK_Data_1:
case FK_Data_2:
case FK_Data_4:
case FK_Data_8:
OpenPOWER on IntegriCloud