Lines Matching refs:Offset
193 MemOperand::MemOperand(Register rn, int32_t offset, AddrMode am) {
196 offset_ = offset;
236 // ldr rd, [pc, #offset]
260 al | B26 | L | Offset | fp.code() * B16;
262 al | B26 | Offset | fp.code() * B16;
373 // Take the jump offset in the lower 24 bits, sign extend it and multiply it
374 // with 4 to get the offset in bytes.
387 int offset = instr & kOff12Mask; // Zero extended offset.
388 return positive ? offset : -offset;
392 Instr Assembler::SetLdrRegisterImmediateOffset(Instr instr, int offset) {
394 bool positive = offset >= 0;
395 if (!positive) offset = -offset;
396 ASSERT(is_uint12(offset));
397 // Set bit indicating whether the offset should be added.
399 // Set the actual offset.
400 return (instr & ~kOff12Mask) | offset;
409 Instr Assembler::SetStrRegisterImmediateOffset(Instr instr, int offset) {
411 bool positive = offset >= 0;
412 if (!positive) offset = -offset;
413 ASSERT(is_uint12(offset));
414 // Set bit indicating whether the offset should be added.
416 // Set the actual offset.
417 return (instr & ~kOff12Mask) | offset;
426 Instr Assembler::SetAddRegisterImmediateOffset(Instr instr, int offset) {
428 ASSERT(offset >= 0);
429 ASSERT(is_uint12(offset));
430 // Set the offset.
431 return (instr & ~kOff12Mask) | offset;
759 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction
873 // Immediate offset.
880 // Immediate offset cannot be encoded, load it first to register ip
890 // Register offset (shift_imm_ and shift_op_ are 0) or scaled
891 // register offset the constructors make sure than both shift_imm_
906 // Immediate offset.
913 // Immediate offset cannot be encoded, load it first to register ip
923 // Scaled register offset not supported, load index first
931 // Register offset.
955 ASSERT((offset_8 & 3) == 0); // offset must be an aligned word offset
961 ASSERT(is_uint8(offset_8)); // unsigned word offset must fit in a byte
987 // be emitted at the pc offset recorded by the label.
1450 // Pattern: Ldr/str same fp+offset, same register.
1461 PrintF("%x str/ldr (fp + same offset), same reg\n", pc_offset());
1465 // Pattern: Ldr/str same fp+offset, different register.
1482 PrintF("%x str/ldr (fp + same offset), diff reg \n", pc_offset());
1499 // with a fp+offset ldr in between
1521 PrintF("%x push/pop -dead ldr fp+offset in middle\n", pc_offset());
1525 // with a fp+offset ldr in between
1587 emit(al | B26 | 0 | Offset | sp.code() * B16 | src.code() * B12);
1833 int offset,
1835 // Ddst = MEM(Rbase + offset).
1838 // Vdst(15-12) | 1011(11-8) | offset
1841 if (offset < 0) {
1842 offset = -offset;
1846 ASSERT(offset >= 0);
1847 if ((offset % 4) == 0 && (offset / 4) < 256) {
1849 0xB*B8 | ((offset / 4) & 255));
1855 add(ip, base, Operand(offset));
1857 sub(ip, base, Operand(offset));
1868 ASSERT(operand.am_ == Offset);
1869 vldr(dst, operand.rn(), operand.offset(), cond);
1875 int offset,
1877 // Sdst = MEM(Rbase + offset).
1880 // Vdst(15-12) | 1010(11-8) | offset
1883 if (offset < 0) {
1884 offset = -offset;
1889 ASSERT(offset >= 0);
1891 if ((offset % 4) == 0 && (offset / 4) < 256) {
1893 0xA*B8 | ((offset / 4) & 255));
1899 add(ip, base, Operand(offset));
1901 sub(ip, base, Operand(offset));
1912 ASSERT(operand.am_ == Offset);
1913 vldr(dst, operand.rn(), operand.offset(), cond);
1919 int offset,
1921 // MEM(Rbase + offset) = Dsrc.
1924 // Vsrc(15-12) | 1011(11-8) | (offset/4)
1927 if (offset < 0) {
1928 offset = -offset;
1931 ASSERT(offset >= 0);
1932 if ((offset % 4) == 0 && (offset / 4) < 256) {
1934 0xB*B8 | ((offset / 4) & 255));
1940 add(ip, base, Operand(offset));
1942 sub(ip, base, Operand(offset));
1953 ASSERT(operand.am_ == Offset);
1954 vstr(src, operand.rn(), operand.offset(), cond);
1960 int offset,
1962 // MEM(Rbase + offset) = SSrc.
1965 // Vdst(15-12) | 1010(11-8) | (offset/4)
1968 if (offset < 0) {
1969 offset = -offset;
1974 ASSERT(offset >= 0);
1975 if ((offset % 4) == 0 && (offset / 4) < 256) {
1977 0xA*B8 | ((offset / 4) & 255));
1983 add(ip, base, Operand(offset));
1985 sub(ip, base, Operand(offset));
1996 ASSERT(operand.am_ == Offset);
1997 vldr(src, operand.rn(), operand.offset(), cond);
2731 // Calculate the offset of the next check. It will be overwritten
2809 // Instruction to patch must be a ldr/str [pc, #offset].
2832 // Since a constant pool was just emitted, move the check offset forward by