void CompiledStaticCall::verify() { // Verify call NativeCall::verify(); if (os::is_MP()) { verify_alignment(); } // Verify stub address stub = find_stub(); assert(stub != NULL, "no stub found for static call"); NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); // Verify state assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted(), "sanity check"); }
void check_alignment(int loops) { unsigned long addr; int loop_failed = 0; int failed = 0; int loop = 0; unsigned char buf[ALIGN_MEM_SIZE]; void initialize_system(void); printf("\nAlignment Test, %d loop%s\n", loops, loops == 1 ? "" : "s"); initialize_system(); for (addr = 0; addr < 256; addr++) buf[addr] = addr; while (loop < loops) { loop++; loop_failed = 0; /* * Fill the memory with a byte count. */ printf("Byte write alignment verify, %4d of %4d : \n", loop, loops); for (addr = 0; addr < 256; addr++) { if (bdmWriteByte(addr + DPRAM_BASE, addr) < 0) { failed = loop_failed = 1; if(stop_quiet) printf("B"); else { printf("\n"); printf("Write byte 0x%02x to 0x%08lx\n", (unsigned char)addr, addr + DPRAM_BASE); show_error("Write byte pattern"); } continue; } else { if ((addr % 32) == 0) printf("\n"); printf("."); } } printf("\n"); if (verify_alignment() < 0) { failed = loop_failed = 1; if(!stop_quiet) { printf("\n"); show_error("Verify byte write"); } } /* * Fill the memory with a byte count. */ printf("\nWord write alignment verify, %4d of %4d : \n", loop, loops); for (addr = 0; addr < 256; addr += 2) { if (bdmWriteWord(addr + DPRAM_BASE, (addr << 8) | (addr + 1)) < 0) { failed = loop_failed = 1; if(stop_quiet) printf("W"); else { printf("\n"); printf("Write word 0x%04x to 0x%08lx\n", (unsigned short) addr, addr + DPRAM_BASE); show_error("Write word pattern"); } continue; } else { if ((addr % 32) == 0) printf("\n"); printf("."); } } printf("\n"); if (verify_alignment() < 0) { failed = loop_failed = 1; if(!stop_quiet) { printf("\n"); show_error("Verify word write"); } } /* * Fill the memory with a byte count. */ printf("\nLong word write alignment verify, %4d of %4d : \n", loop, loops); for (addr = 0; addr < 256; addr += 4) { if (bdmWriteLongWord(addr + DPRAM_BASE, ((addr << 24) | ((addr + 1) << 16) | ((addr + 2) << 8) | (addr + 3)))) { failed = loop_failed = 1; if(stop_quiet) printf("L"); else { printf("\n"); printf("Write long word 0x%08lx to 0x%08lx\n", addr, addr + DPRAM_BASE); show_error("Write long word pattern"); } continue; } else { if ((addr % 32) == 0) printf("\n"); printf("."); } } printf("\n"); if (verify_alignment() < 0) { failed = loop_failed = 1; if(!stop_quiet) { printf("\n"); show_error("Verify long word write"); } } printf("\nBlock write alignment verify, %4d of %4d : \n", loop, loops); if (bdmWriteMemory(DPRAM_BASE, (unsigned char*) buf, ALIGN_MEM_SIZE) < 0) { if(stop_quiet) printf("K\n"); else show_error("Writing block buffer"); } if (verify_alignment() < 0) { failed = loop_failed = 1; if(!stop_quiet) { printf("\n"); show_error("Verify long word write"); } } } if (failed) { show_error("Alignment check"); } printf("\n"); }