/dalvik/dx/junit-tests/com/android/dx/util/ |
D | BitsTest.java | 54 int[] bits = Bits.makeBitSet(100); in test1_get() local 57 assertFalse(label(i), Bits.get(bits, i)); in test1_get() 62 int[] bits = Bits.makeBitSet(100); in test2_get() local 63 for (int i = 0; i < bits.length; i++) { in test2_get() 64 bits[i] = -1; in test2_get() 68 assertTrue(label(i), Bits.get(bits, i)); in test2_get() 73 int[] bits = Bits.makeBitSet(100); in test3_get() local 76 Bits.set(bits, i, (i % 5) == 0); in test3_get() 81 assertTrue(label(i), Bits.get(bits, i) == expect); in test3_get() 86 int[] bits = Bits.makeBitSet(50); in test1_set1() local [all …]
|
/dalvik/dx/src/com/android/dx/rop/cst/ |
D | CstLiteral64.java | 25 private final long bits; field in CstLiteral64 32 /*package*/ CstLiteral64(long bits) { in CstLiteral64() argument 33 this.bits = bits; in CstLiteral64() 41 bits == ((CstLiteral64) other).bits; in equals() 47 return (int) bits ^ (int) (bits >> 32); in hashCode() 53 long otherBits = ((CstLiteral64) other).bits; in compareTo0() 55 if (bits < otherBits) { in compareTo0() 57 } else if (bits > otherBits) { in compareTo0() 73 return (int) bits == bits; in fitsInInt() 79 return (int) bits; in getIntBits() [all …]
|
D | CstLiteral32.java | 25 private final int bits; field in CstLiteral32 32 /*package*/ CstLiteral32(int bits) { in CstLiteral32() argument 33 this.bits = bits; in CstLiteral32() 41 bits == ((CstLiteral32) other).bits; in equals() 47 return bits; in hashCode() 53 int otherBits = ((CstLiteral32) other).bits; in compareTo0() 55 if (bits < otherBits) { in compareTo0() 57 } else if (bits > otherBits) { in compareTo0() 79 return bits; in getIntBits() 85 return (long) bits; in getLongBits()
|
D | CstLiteralBits.java | 64 int bits = getIntBits(); in fitsIn16Bits() local 65 return (short) bits == bits; in fitsIn16Bits() 79 int bits = getIntBits(); in fitsIn8Bits() local 80 return (byte) bits == bits; in fitsIn8Bits()
|
D | CstDouble.java | 41 public static CstDouble make(long bits) { in make() argument 46 return new CstDouble(bits); in make() 54 private CstDouble(long bits) { in CstDouble() argument 55 super(bits); in CstDouble() 61 long bits = getLongBits(); in toString() local 62 return "double{0x" + Hex.u8(bits) + " / " + in toString() 63 Double.longBitsToDouble(bits) + '}'; in toString()
|
D | CstFloat.java | 42 public static CstFloat make(int bits) { in make() argument 47 return new CstFloat(bits); in make() 55 private CstFloat(int bits) { in CstFloat() argument 56 super(bits); in CstFloat() 62 int bits = getIntBits(); in toString() local 63 return "float{0x" + Hex.u4(bits) + " / " + in toString() 64 Float.intBitsToFloat(bits) + '}'; in toString()
|
/dalvik/dexgen/src/com/android/dexgen/rop/cst/ |
D | CstLiteral64.java | 25 private final long bits; field in CstLiteral64 32 /*package*/ CstLiteral64(long bits) { in CstLiteral64() argument 33 this.bits = bits; in CstLiteral64() 41 bits == ((CstLiteral64) other).bits; in equals() 47 return (int) bits ^ (int) (bits >> 32); in hashCode() 53 long otherBits = ((CstLiteral64) other).bits; in compareTo0() 55 if (bits < otherBits) { in compareTo0() 57 } else if (bits > otherBits) { in compareTo0() 73 return (int) bits == bits; in fitsInInt() 79 return (int) bits; in getIntBits() [all …]
|
D | CstLiteral32.java | 25 private final int bits; field in CstLiteral32 32 /*package*/ CstLiteral32(int bits) { in CstLiteral32() argument 33 this.bits = bits; in CstLiteral32() 41 bits == ((CstLiteral32) other).bits; in equals() 47 return bits; in hashCode() 53 int otherBits = ((CstLiteral32) other).bits; in compareTo0() 55 if (bits < otherBits) { in compareTo0() 57 } else if (bits > otherBits) { in compareTo0() 79 return bits; in getIntBits() 85 return (long) bits; in getLongBits()
|
D | CstLiteralBits.java | 64 int bits = getIntBits(); in fitsIn16Bits() local 65 return (short) bits == bits; in fitsIn16Bits() 79 int bits = getIntBits(); in fitsIn8Bits() local 80 return (byte) bits == bits; in fitsIn8Bits()
|
D | CstDouble.java | 41 public static CstDouble make(long bits) { in make() argument 46 return new CstDouble(bits); in make() 54 private CstDouble(long bits) { in CstDouble() argument 55 super(bits); in CstDouble() 61 long bits = getLongBits(); in toString() local 62 return "double{0x" + Hex.u8(bits) + " / " + in toString() 63 Double.longBitsToDouble(bits) + '}'; in toString()
|
D | CstFloat.java | 42 public static CstFloat make(int bits) { in make() argument 47 return new CstFloat(bits); in make() 55 private CstFloat(int bits) { in CstFloat() argument 56 super(bits); in CstFloat() 62 int bits = getIntBits(); in toString() local 63 return "float{0x" + Hex.u4(bits) + " / " + in toString() 64 Float.intBitsToFloat(bits) + '}'; in toString()
|
/dalvik/dx/src/com/android/dx/util/ |
D | Bits.java | 47 public static int getMax(int[] bits) { in getMax() argument 48 return bits.length * 0x20; in getMax() 58 public static boolean get(int[] bits, int idx) { in get() argument 61 return (bits[arrayIdx] & bit) != 0; in get() 71 public static void set(int[] bits, int idx, boolean value) { in set() argument 76 bits[arrayIdx] |= bit; in set() 78 bits[arrayIdx] &= ~bit; in set() 88 public static void set(int[] bits, int idx) { in set() argument 91 bits[arrayIdx] |= bit; in set() 100 public static void clear(int[] bits, int idx) { in clear() argument [all …]
|
D | BitIntSet.java | 27 int[] bits; field in BitIntSet 35 bits = Bits.makeBitSet(max); in BitIntSet() 41 Bits.set(bits, value, true); in add() 50 if (value >= Bits.getMax(bits)) { in ensureCapacity() 52 Math.max(value + 1, 2 * Bits.getMax(bits))); in ensureCapacity() 53 System.arraycopy(bits, 0, newBits, 0, bits.length); in ensureCapacity() 54 bits = newBits; in ensureCapacity() 60 if (value < Bits.getMax(bits)) { in remove() 61 Bits.set(bits, value, false); in remove() 67 return (value < Bits.getMax(bits)) && Bits.get(bits, value); in has() [all …]
|
/dalvik/dexgen/src/com/android/dexgen/util/ |
D | Bits.java | 47 public static int getMax(int[] bits) { in getMax() argument 48 return bits.length * 0x20; in getMax() 58 public static boolean get(int[] bits, int idx) { in get() argument 61 return (bits[arrayIdx] & bit) != 0; in get() 71 public static void set(int[] bits, int idx, boolean value) { in set() argument 76 bits[arrayIdx] |= bit; in set() 78 bits[arrayIdx] &= ~bit; in set() 88 public static void set(int[] bits, int idx) { in set() argument 91 bits[arrayIdx] |= bit; in set() 100 public static void clear(int[] bits, int idx) { in clear() argument [all …]
|
D | BitIntSet.java | 27 int[] bits; field in BitIntSet 35 bits = Bits.makeBitSet(max); in BitIntSet() 41 Bits.set(bits, value, true); in add() 50 if (value >= Bits.getMax(bits)) { in ensureCapacity() 52 Math.max(value + 1, 2 * Bits.getMax(bits))); in ensureCapacity() 53 System.arraycopy(bits, 0, newBits, 0, bits.length); in ensureCapacity() 54 bits = newBits; in ensureCapacity() 60 if (value < Bits.getMax(bits)) { in remove() 61 Bits.set(bits, value, false); in remove() 67 return (value < Bits.getMax(bits)) && Bits.get(bits, value); in has() [all …]
|
/dalvik/vm/alloc/ |
D | HeapBitmap.cpp | 29 void *bits; in dvmHeapBitmapInit() local 34 bitsLen = HB_OFFSET_TO_INDEX(maxSize) * sizeof(*hb->bits); in dvmHeapBitmapInit() 35 bits = dvmAllocRegion(bitsLen, PROT_READ | PROT_WRITE, name); in dvmHeapBitmapInit() 36 if (bits == NULL) { in dvmHeapBitmapInit() 40 hb->bits = (unsigned long *)bits; in dvmHeapBitmapInit() 54 if (hb->bits != NULL) { in dvmHeapBitmapDelete() 55 munmap((char *)hb->bits, hb->allocLen); in dvmHeapBitmapDelete() 68 if (hb->bits != NULL) { in dvmHeapBitmapZero() 72 madvise(hb->bits, hb->bitsLen, MADV_DONTNEED); in dvmHeapBitmapZero() 88 return index < hb->bitsLen / sizeof(*hb->bits); in dvmHeapBitmapCoversAddress() [all …]
|
D | HeapBitmapInlines.h | 34 assert(hb->bits != NULL); in _heapBitmapModifyObjectBit() 36 assert(index < hb->bitsLen / sizeof(*hb->bits)); in _heapBitmapModifyObjectBit() 42 unsigned long *p = hb->bits + index; in _heapBitmapModifyObjectBit() 47 hb->bits[index] |= mask; in _heapBitmapModifyObjectBit() 50 hb->bits[index] &= ~mask; in _heapBitmapModifyObjectBit() 97 assert(hb->bits != NULL); in dvmHeapBitmapIsObjectBitSet() 101 return hb->bits[HB_OFFSET_TO_INDEX(offset)] & HB_OFFSET_TO_MASK(offset); in dvmHeapBitmapIsObjectBitSet()
|
/dalvik/dx/src/com/android/dx/dex/code/form/ |
D | Form21h.java | 91 int bits = cb.getIntBits(); in isCompatible() local 92 return ((bits & 0xffff) == 0); in isCompatible() 94 long bits = cb.getLongBits(); in isCompatible() local 95 return ((bits & 0xffffffffffffL) == 0); in isCompatible() 103 BitSet bits = new BitSet(1); in compatibleRegs() local 105 bits.set(0, unsignedFitsInByte(regs.get(0).getReg())); in compatibleRegs() 106 return bits; in compatibleRegs() 114 short bits; in writeTo() local 118 bits = (short) (cb.getIntBits() >>> 16); in writeTo() 120 bits = (short) (cb.getLongBits() >>> 48); in writeTo() [all …]
|
D | Form12x.java | 114 BitSet bits = new BitSet(2); in compatibleRegs() local 120 bits.set(0, unsignedFitsInNibble(r0)); in compatibleRegs() 121 bits.set(1, unsignedFitsInNibble(r1)); in compatibleRegs() 126 bits.set(0, false); in compatibleRegs() 127 bits.set(1, false); in compatibleRegs() 130 bits.set(0, dstRegComp); in compatibleRegs() 131 bits.set(1, dstRegComp); in compatibleRegs() 134 bits.set(2, unsignedFitsInNibble(regs.get(2).getReg())); in compatibleRegs() 142 return bits; in compatibleRegs()
|
D | Form23x.java | 79 BitSet bits = new BitSet(3); in compatibleRegs() local 81 bits.set(0, unsignedFitsInByte(regs.get(0).getReg())); in compatibleRegs() 82 bits.set(1, unsignedFitsInByte(regs.get(1).getReg())); in compatibleRegs() 83 bits.set(2, unsignedFitsInByte(regs.get(2).getReg())); in compatibleRegs() 84 return bits; in compatibleRegs()
|
D | Form22x.java | 77 BitSet bits = new BitSet(2); in compatibleRegs() local 79 bits.set(0, unsignedFitsInByte(regs.get(0).getReg())); in compatibleRegs() 80 bits.set(1, unsignedFitsInShort(regs.get(1).getReg())); in compatibleRegs() 81 return bits; in compatibleRegs()
|
D | Form32x.java | 76 BitSet bits = new BitSet(2); in compatibleRegs() local 78 bits.set(0, unsignedFitsInShort(regs.get(0).getReg())); in compatibleRegs() 79 bits.set(1, unsignedFitsInShort(regs.get(1).getReg())); in compatibleRegs() 80 return bits; in compatibleRegs()
|
D | Form21c.java | 123 BitSet bits = new BitSet(sz); in compatibleRegs() local 127 bits.set(0, compat); in compatibleRegs() 130 bits.set(0, compat); in compatibleRegs() 131 bits.set(1, compat); in compatibleRegs() 135 return bits; in compatibleRegs()
|
/dalvik/dexgen/src/com/android/dexgen/dex/code/form/ |
D | Form21h.java | 90 int bits = cb.getIntBits(); in isCompatible() local 91 return ((bits & 0xffff) == 0); in isCompatible() 93 long bits = cb.getLongBits(); in isCompatible() local 94 return ((bits & 0xffffffffffffL) == 0); in isCompatible() 109 short bits; in writeTo() local 113 bits = (short) (cb.getIntBits() >>> 16); in writeTo() 115 bits = (short) (cb.getLongBits() >>> 48); in writeTo() 118 write(out, opcodeUnit(insn, regs.get(0).getReg()), bits); in writeTo()
|
/dalvik/vm/compiler/codegen/arm/ |
D | ArchUtility.cpp | 55 u4 bits = value & 0xff; in expandImmediate() local 58 return bits; in expandImmediate() 60 return (bits << 16) | bits; in expandImmediate() 62 return (bits << 24) | (bits << 8); in expandImmediate() 64 return (bits << 24) | (bits << 16) | (bits << 8) | bits; in expandImmediate() 68 bits = (bits | 0x80) << 24; in expandImmediate() 69 return bits >> (((value & 0xf80) >> 7) - 8); in expandImmediate()
|