/art/runtime/base/ |
H A D | file_magic.cc | 29 ScopedFd OpenAndReadMagic(const char* filename, uint32_t* magic, std::string* error_msg) { argument 30 CHECK(magic != nullptr); 36 int n = TEMP_FAILURE_RETRY(read(fd.get(), magic, sizeof(*magic))); 37 if (n != sizeof(*magic)) { 38 *error_msg = StringPrintf("Failed to find magic in '%s'", filename); 49 bool IsZipMagic(uint32_t magic) { argument 50 return (('P' == ((magic >> 0) & 0xff)) && 51 ('K' == ((magic >> 8) & 0xff))); 54 bool IsDexMagic(uint32_t magic) { argument [all...] |
H A D | file_magic.h | 27 // Open file and read magic number 28 ScopedFd OpenAndReadMagic(const char* filename, uint32_t* magic, std::string* error_msg); 30 // Check whether the given magic matches a known file type. 31 bool IsZipMagic(uint32_t magic); 32 bool IsDexMagic(uint32_t magic);
|
/art/compiler/optimizing/ |
H A D | code_generator_utils.h | 26 // Computes the magic number and the shift needed in the div/rem by constant algorithm, as out 27 // arguments `magic` and `shift` 28 void CalculateMagicAndShiftForDivRem(int64_t divisor, bool is_long, int64_t* magic, int* shift);
|
H A D | code_generator_utils.cc | 25 int64_t* magic, int* shift) { 26 // It does not make sense to calculate magic and shift for zero divisor. 32 * The magic number M and shift S can be calculated in the following way: 45 * The magic number M is calculated by 89 *magic = (divisor > 0) ? (quotient2 + 1) : (-quotient2 - 1); 92 *magic = static_cast<int>(*magic); 24 CalculateMagicAndShiftForDivRem(int64_t divisor, bool is_long, int64_t* magic, int* shift) argument
|
H A D | code_generator_mips64.cc | 1993 int64_t magic; local 1997 &magic, 2001 __ LoadConst32(TMP, magic); 2004 if (imm > 0 && magic < 0) { 2006 } else if (imm < 0 && magic > 0) { 2025 __ LoadConst64(TMP, magic); 2028 if (imm > 0 && magic < 0) { 2030 } else if (imm < 0 && magic > 0) {
|
H A D | code_generator_x86_64.cc | 3386 int64_t magic; local 3393 CalculateMagicAndShiftForDivRem(imm, false /* is_long */, &magic, &shift); 3407 __ movl(eax, Immediate(magic)); 3410 if (imm > 0 && magic < 0) { 3412 } else if (imm < 0 && magic > 0) { 3441 CalculateMagicAndShiftForDivRem(imm, true /* is_long */, &magic, &shift); 3446 // RAX = magic 3447 codegen_->Load64BitValue(rax, magic); 3449 // RDX:RAX = magic * numerator 3452 if (imm > 0 && magic < [all...] |
H A D | code_generator_arm64.cc | 2589 int64_t magic; local 2591 CalculateMagicAndShiftForDivRem(imm, type == Primitive::kPrimLong /* is_long */, &magic, &shift); 2596 // temp = get_high(dividend * magic) 2597 __ Mov(temp, magic); 2605 if (imm > 0 && magic < 0) { 2607 } else if (imm < 0 && magic > 0) {
|
H A D | code_generator_mips.cc | 2347 int64_t magic; local 2349 CalculateMagicAndShiftForDivRem(imm, false /* is_long */, &magic, &shift); 2353 __ LoadConst32(TMP, magic); 2360 if (imm > 0 && magic < 0) { 2362 } else if (imm < 0 && magic > 0) {
|
H A D | code_generator_arm.cc | 2769 int64_t magic; local 2771 CalculateMagicAndShiftForDivRem(imm, false /* is_long */, &magic, &shift); 2773 __ LoadImmediate(temp1, magic); 2776 if (imm > 0 && magic < 0) { 2778 } else if (imm < 0 && magic > 0) {
|
H A D | code_generator_x86.cc | 3305 int64_t magic; local 3307 CalculateMagicAndShiftForDivRem(imm, false /* is_long */, &magic, &shift); 3323 // EAX = magic 3324 __ movl(eax, Immediate(magic)); 3326 // EDX:EAX = magic * numerator 3329 if (imm > 0 && magic < 0) { 3332 } else if (imm < 0 && magic > 0) {
|
/art/test/037-inherit/src/ |
H A D | Main.java | 10 MagicClass magic = new MagicClass(); 12 System.out.print("magic is "); 13 System.out.println(magic.getSomeData());
|
/art/tools/dexfuzz/src/dexfuzz/rawdex/ |
H A D | HeaderItem.java | 24 public byte[] magic; field in class:HeaderItem 51 magic = new byte[8]; 53 magic[i] = file.readByte(); 93 file.writeByte(magic[i]);
|
/art/tools/ |
H A D | stream-trace-converter.py | 79 magic = ReadIntLE(input) 80 if magic != 0x574f4c53: 83 WriteIntLE(body, magic)
|
/art/runtime/gc/space/ |
H A D | large_object_space_test.cc | 61 // Fill in our magic value. 62 uint8_t magic = (request_size & 0xFF) | 1; local 63 memset(obj, magic, request_size); 93 uint8_t magic = (request_size & 0xFF) | 1; local 95 ASSERT_EQ(reinterpret_cast<const uint8_t*>(obj)[k], magic);
|
/art/compiler/ |
H A D | image_test.cc | 513 char* magic = const_cast<char*>(image_header.GetMagic()); 514 strcpy(magic, ""); // bad magic 516 strcpy(magic, "art\n000"); // bad version
|
H A D | oat_test.cc | 463 char* magic = const_cast<char*>(oat_header->GetMagic()); local 464 strcpy(magic, ""); // bad magic 466 strcpy(magic, "oat\n000"); // bad version
|
H A D | oat_writer.cc | 324 uint32_t magic; 326 ScopedFd fd(OpenAndReadMagic(filename, &magic, &error_msg)); 328 PLOG(ERROR) << "Failed to read magic number from dex file: '" << filename << "'"; 330 } else if (IsDexMagic(magic)) { 337 } else if (IsZipMagic(magic)) { 1793 LOG(ERROR) << "Invalid magic number in dex file header. " << " File: " << location;
|
/art/tools/dmtracedump/ |
H A D | createtesttrace.cc | 37 uint32_t magic; member in struct:DataHeader 346 write4LE(dataFp, header.magic);
|
H A D | tracedump.cc | 122 uint32_t magic; member in struct:DataHeader 941 pHeader->magic = read4LE(fp);
|
/art/runtime/ |
H A D | dex_file.cc | 74 uint32_t magic; local 88 ScopedFd fd(OpenAndReadMagic(file_part, &magic, error_msg)); 93 if (IsZipMagic(magic)) { 110 if (IsDexMagic(magic)) { 127 uint32_t magic; local 128 ScopedFd fd(OpenAndReadMagic(filename, &magic, error_msg)); 133 if (IsZipMagic(magic)) { 136 if (IsDexMagic(magic)) { 161 uint32_t magic; local 163 ScopedFd fd(OpenAndReadMagic(filename, &magic, 495 IsMagicValid(const uint8_t* magic) argument 499 IsVersionValid(const uint8_t* magic) argument [all...] |
H A D | dex_file.h | 115 // Decode the dex magic version 422 // Checks whether the given file has the dex magic, or is a zip file with a classes.dex entry. 489 // Decode the dex magic version 494 // Returns true if the byte string points to the magic value. 495 static bool IsMagicValid(const uint8_t* magic); 497 // Returns true if the byte string after the magic is the correct value. 498 static bool IsVersionValid(const uint8_t* magic); 1226 // Returns true if the header magic and version numbers are of the expected values.
|
/art/runtime/hprof/ |
H A D | hprof.cc | 640 // U1: NUL-terminated magic string. 641 const char magic[] = "JAVA PROFILE 1.0.3"; local 642 __ AddU1List(reinterpret_cast<const uint8_t*>(magic), sizeof(magic));
|