Lines Matching refs:Value

37 static void signed_width(unsigned Width, uint64_t Value,  in signed_width()  argument
40 if (!isIntN(Width, Value)) { in signed_width()
57 static void unsigned_width(unsigned Width, uint64_t Value, in unsigned_width() argument
60 if (!isUIntN(Width, Value)) { in unsigned_width()
77 static void adjustBranch(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in adjustBranch() argument
81 unsigned_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); in adjustBranch()
84 AVR::fixups::adjustBranchTarget(Value); in adjustBranch()
89 uint64_t &Value, MCContext *Ctx = nullptr) { in adjustRelativeBranch() argument
92 signed_width(Size + 1, Value, std::string("branch target"), Fixup, Ctx); in adjustRelativeBranch()
95 AVR::fixups::adjustBranchTarget(Value); in adjustRelativeBranch()
104 static void fixup_call(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_call() argument
106 adjustBranch(Size, Fixup, Value, Ctx); in fixup_call()
108 auto top = Value & (0xf00000 << 6); // the top four bits in fixup_call()
109 auto middle = Value & (0x1ffff << 5); // the middle 13 bits in fixup_call()
110 auto bottom = Value & 0x1f; // end bottom 5 bits in fixup_call()
112 Value = (top << 6) | (middle << 3) | (bottom << 0); in fixup_call()
120 static void fixup_7_pcrel(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_7_pcrel() argument
122 adjustRelativeBranch(Size, Fixup, Value, Ctx); in fixup_7_pcrel()
125 Value &= 0x7f; in fixup_7_pcrel()
134 static void fixup_13_pcrel(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup_13_pcrel() argument
136 adjustRelativeBranch(Size, Fixup, Value, Ctx); in fixup_13_pcrel()
139 Value &= 0xfff; in fixup_13_pcrel()
147 static void fixup_6(const MCFixup &Fixup, uint64_t &Value, in fixup_6() argument
149 unsigned_width(6, Value, std::string("immediate"), Fixup, Ctx); in fixup_6()
151 Value = ((Value & 0x20) << 8) | ((Value & 0x18) << 7) | (Value & 0x07); in fixup_6()
159 static void fixup_6_adiw(const MCFixup &Fixup, uint64_t &Value, in fixup_6_adiw() argument
161 unsigned_width(6, Value, std::string("immediate"), Fixup, Ctx); in fixup_6_adiw()
163 Value = ((Value & 0x30) << 2) | (Value & 0x0f); in fixup_6_adiw()
170 static void fixup_port5(const MCFixup &Fixup, uint64_t &Value, in fixup_port5() argument
172 unsigned_width(5, Value, std::string("port number"), Fixup, Ctx); in fixup_port5()
174 Value &= 0x1f; in fixup_port5()
176 Value <<= 3; in fixup_port5()
183 static void fixup_port6(const MCFixup &Fixup, uint64_t &Value, in fixup_port6() argument
185 unsigned_width(6, Value, std::string("port number"), Fixup, Ctx); in fixup_port6()
187 Value = ((Value & 0x30) << 5) | (Value & 0x0f); in fixup_port6()
192 static void pm(uint64_t &Value) { Value >>= 1; } in pm() argument
202 static void fixup(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in fixup() argument
204 uint64_t upper = Value & 0xf0; in fixup()
205 uint64_t lower = Value & 0x0f; in fixup()
207 Value = (upper << 4) | lower; in fixup()
210 static void neg(uint64_t &Value) { Value *= -1; } in neg() argument
212 static void lo8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in lo8() argument
214 Value &= 0xff; in lo8()
215 ldi::fixup(Size, Fixup, Value, Ctx); in lo8()
218 static void hi8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in hi8() argument
220 Value = (Value & 0xff00) >> 8; in hi8()
221 ldi::fixup(Size, Fixup, Value, Ctx); in hi8()
224 static void hh8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in hh8() argument
226 Value = (Value & 0xff0000) >> 16; in hh8()
227 ldi::fixup(Size, Fixup, Value, Ctx); in hh8()
230 static void ms8(unsigned Size, const MCFixup &Fixup, uint64_t &Value, in ms8() argument
232 Value = (Value & 0xff000000) >> 24; in ms8()
233 ldi::fixup(Size, Fixup, Value, Ctx); in ms8()
243 const MCValue &Target, uint64_t &Value, in adjustFixupValue() argument
253 adjust::fixup_7_pcrel(Size, Fixup, Value, Ctx); in adjustFixupValue()
256 adjust::fixup_13_pcrel(Size, Fixup, Value, Ctx); in adjustFixupValue()
259 adjust::fixup_call(Size, Fixup, Value, Ctx); in adjustFixupValue()
262 adjust::ldi::fixup(Size, Fixup, Value, Ctx); in adjustFixupValue()
265 adjust::ldi::lo8(Size, Fixup, Value, Ctx); in adjustFixupValue()
269 adjust::pm(Value); in adjustFixupValue()
270 adjust::ldi::lo8(Size, Fixup, Value, Ctx); in adjustFixupValue()
273 adjust::ldi::hi8(Size, Fixup, Value, Ctx); in adjustFixupValue()
277 adjust::pm(Value); in adjustFixupValue()
278 adjust::ldi::hi8(Size, Fixup, Value, Ctx); in adjustFixupValue()
283 adjust::pm(Value); in adjustFixupValue()
285 adjust::ldi::hh8(Size, Fixup, Value, Ctx); in adjustFixupValue()
288 adjust::ldi::ms8(Size, Fixup, Value, Ctx); in adjustFixupValue()
294 adjust::pm(Value); in adjustFixupValue()
296 adjust::ldi::neg(Value); in adjustFixupValue()
297 adjust::ldi::lo8(Size, Fixup, Value, Ctx); in adjustFixupValue()
302 adjust::pm(Value); in adjustFixupValue()
304 adjust::ldi::neg(Value); in adjustFixupValue()
305 adjust::ldi::hi8(Size, Fixup, Value, Ctx); in adjustFixupValue()
310 adjust::pm(Value); in adjustFixupValue()
312 adjust::ldi::neg(Value); in adjustFixupValue()
313 adjust::ldi::hh8(Size, Fixup, Value, Ctx); in adjustFixupValue()
316 adjust::ldi::neg(Value); in adjustFixupValue()
317 adjust::ldi::ms8(Size, Fixup, Value, Ctx); in adjustFixupValue()
320 adjust::unsigned_width(16, Value, std::string("port number"), Fixup, Ctx); in adjustFixupValue()
322 Value &= 0xffff; in adjustFixupValue()
325 Value >>= 1; // Flash addresses are always shifted. in adjustFixupValue()
326 adjust::unsigned_width(16, Value, std::string("port number"), Fixup, Ctx); in adjustFixupValue()
328 Value &= 0xffff; in adjustFixupValue()
332 adjust::fixup_6(Fixup, Value, Ctx); in adjustFixupValue()
335 adjust::fixup_6_adiw(Fixup, Value, Ctx); in adjustFixupValue()
339 adjust::fixup_port5(Fixup, Value, Ctx); in adjustFixupValue()
343 adjust::fixup_port6(Fixup, Value, Ctx); in adjustFixupValue()
366 MutableArrayRef<char> Data, uint64_t Value, in applyFixup() argument
369 adjustFixupValue(Fixup, Target, Value, &Asm.getContext()); in applyFixup()
370 if (Value == 0) in applyFixup()
380 Value <<= Info.TargetOffset; in applyFixup()
388 uint8_t mask = (((Value >> (i * 8)) & 0xff)); in applyFixup()