Lines Matching refs:Value

38 void signed_width(unsigned Width, uint64_t Value, std::string Description,  in signed_width()  argument
40 if (!isIntN(Width, Value)) { in signed_width()
57 void unsigned_width(unsigned Width, uint64_t Value, std::string Description, in unsigned_width() argument
59 if (!isUIntN(Width, Value)) { in unsigned_width()
76 void adjustBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in adjustBranch() argument
80 unsigned_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); in adjustBranch()
83 AVR::fixups::adjustBranchTarget(Value); in adjustBranch()
87 void adjustRelativeBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in adjustRelativeBranch() argument
91 signed_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); in adjustRelativeBranch()
93 Value -= 2; in adjustRelativeBranch()
96 AVR::fixups::adjustBranchTarget(Value); in adjustRelativeBranch()
105 void fixup_call(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_call() argument
107 adjustBranch(Size, Fixup, Value, Ctx); in fixup_call()
109 auto top = Value & (0xf00000 << 6); // the top four bits in fixup_call()
110 auto middle = Value & (0x1ffff << 5); // the middle 13 bits in fixup_call()
111 auto bottom = Value & 0x1f; // end bottom 5 bits in fixup_call()
113 Value = (top << 6) | (middle << 3) | (bottom << 0); in fixup_call()
121 void fixup_7_pcrel(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_7_pcrel() argument
123 adjustRelativeBranch(Size, Fixup, Value, Ctx); in fixup_7_pcrel()
126 Value &= 0x7f; in fixup_7_pcrel()
135 void fixup_13_pcrel(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_13_pcrel() argument
137 adjustRelativeBranch(Size, Fixup, Value, Ctx); in fixup_13_pcrel()
140 Value &= 0xfff; in fixup_13_pcrel()
148 void fixup_6_adiw(const MCFixup &Fixup, uint64_t &Value, in fixup_6_adiw() argument
150 unsigned_width(6, Value, std::string("immediate"), Fixup, Ctx); in fixup_6_adiw()
152 Value = ((Value & 0x30) << 2) | (Value & 0x0f); in fixup_6_adiw()
159 void fixup_port5(const MCFixup &Fixup, uint64_t &Value, in fixup_port5() argument
161 unsigned_width(5, Value, std::string("port number"), Fixup, Ctx); in fixup_port5()
163 Value &= 0x1f; in fixup_port5()
165 Value <<= 3; in fixup_port5()
172 void fixup_port6(const MCFixup &Fixup, uint64_t &Value, in fixup_port6() argument
174 unsigned_width(6, Value, std::string("port number"), Fixup, Ctx); in fixup_port6()
176 Value = ((Value & 0x30) << 5) | (Value & 0x0f); in fixup_port6()
181 void pm(uint64_t &Value) { in pm() argument
182 Value >>= 1; in pm()
193 void fixup(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup() argument
195 uint64_t upper = Value & 0xf0; in fixup()
196 uint64_t lower = Value & 0x0f; in fixup()
198 Value = (upper << 4) | lower; in fixup()
201 void neg(uint64_t &Value) { Value *= -1; } in neg() argument
203 void lo8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in lo8() argument
205 Value &= 0xff; in lo8()
206 ldi::fixup(Size, Fixup, Value, Ctx); in lo8()
209 void hi8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in hi8() argument
211 Value = (Value & 0xff00) >> 8; in hi8()
212 ldi::fixup(Size, Fixup, Value, Ctx); in hi8()
215 void hh8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in hh8() argument
217 Value = (Value & 0xff0000) >> 16; in hh8()
218 ldi::fixup(Size, Fixup, Value, Ctx); in hh8()
221 void ms8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in ms8() argument
223 Value = (Value & 0xff000000) >> 24; in ms8()
224 ldi::fixup(Size, Fixup, Value, Ctx); in ms8()
235 uint64_t &Value, in adjustFixupValue() argument
249 Value += 2; in adjustFixupValue()
256 adjust::fixup_7_pcrel(Size, Fixup, Value, Ctx); in adjustFixupValue()
259 adjust::fixup_13_pcrel(Size, Fixup, Value, Ctx); in adjustFixupValue()
262 adjust::fixup_call(Size, Fixup, Value, Ctx); in adjustFixupValue()
265 adjust::ldi::fixup(Size, Fixup, Value, Ctx); in adjustFixupValue()
268 adjust::ldi::lo8(Size, Fixup, Value, Ctx); in adjustFixupValue()
272 adjust::pm(Value); in adjustFixupValue()
273 adjust::ldi::lo8(Size, Fixup, Value, Ctx); in adjustFixupValue()
276 adjust::ldi::hi8(Size, Fixup, Value, Ctx); in adjustFixupValue()
280 adjust::pm(Value); in adjustFixupValue()
281 adjust::ldi::hi8(Size, Fixup, Value, Ctx); in adjustFixupValue()
285 if (Kind == AVR::fixup_hh8_ldi_pm) adjust::pm(Value); in adjustFixupValue()
287 adjust::ldi::hh8(Size, Fixup, Value, Ctx); in adjustFixupValue()
290 adjust::ldi::ms8(Size, Fixup, Value, Ctx); in adjustFixupValue()
295 if (Kind == AVR::fixup_lo8_ldi_pm_neg) adjust::pm(Value); in adjustFixupValue()
297 adjust::ldi::neg(Value); in adjustFixupValue()
298 adjust::ldi::lo8(Size, Fixup, Value, Ctx); in adjustFixupValue()
302 if (Kind == AVR::fixup_hi8_ldi_pm_neg) adjust::pm(Value); in adjustFixupValue()
304 adjust::ldi::neg(Value); in adjustFixupValue()
305 adjust::ldi::hi8(Size, Fixup, Value, Ctx); in adjustFixupValue()
309 if (Kind == AVR::fixup_hh8_ldi_pm_neg) adjust::pm(Value); in adjustFixupValue()
311 adjust::ldi::neg(Value); in adjustFixupValue()
312 adjust::ldi::hh8(Size, Fixup, Value, Ctx); in adjustFixupValue()
315 adjust::ldi::neg(Value); in adjustFixupValue()
316 adjust::ldi::ms8(Size, Fixup, Value, Ctx); in adjustFixupValue()
319 adjust::unsigned_width(16, Value, std::string("port number"), Fixup, Ctx); in adjustFixupValue()
321 Value &= 0xffff; in adjustFixupValue()
324 Value >>= 1; // Flash addresses are always shifted. in adjustFixupValue()
325 adjust::unsigned_width(16, Value, std::string("port number"), Fixup, Ctx); in adjustFixupValue()
327 Value &= 0xffff; in adjustFixupValue()
331 adjust::fixup_6_adiw(Fixup, Value, Ctx); in adjustFixupValue()
335 adjust::fixup_port5(Fixup, Value, Ctx); in adjustFixupValue()
339 adjust::fixup_port6(Fixup, Value, Ctx); in adjustFixupValue()
362 MutableArrayRef<char> Data, uint64_t Value, in applyFixup() argument
365 adjustFixupValue(Fixup, Target, Value, &Asm.getContext()); in applyFixup()
366 if (Value == 0) in applyFixup()
376 Value <<= Info.TargetOffset; in applyFixup()
384 uint8_t mask = (((Value >> (i * 8)) & 0xff)); in applyFixup()