Alien-LibJIT

 view release on metacpan or  search on metacpan

libjit/jit/jit-alloc.c  view on Meta::CPAN

	/* Flush the data out of the data cache */
	p   = ROUND_BEG_PTR (ptr);
	end = ROUND_END_PTR (p, size);
	while (p < end)
	{
		__asm__ __volatile__ ("dcbst 0,%0" :: "r"(p));
		p += CLSIZE;
	}
	__asm__ __volatile__ ("sync");

	/* Invalidate the cache lines in the instruction cache */
	p = ROUND_BEG_PTR (ptr);
	while (p < end)
	{
		__asm__ __volatile__ ("icbi 0,%0; isync" :: "r"(p));
		p += CLSIZE;
	}
	__asm__ __volatile__ ("isync");

#elif defined(__sparc)

libjit/jit/jit-elf-read.c  view on Meta::CPAN

			sys_close(fd);
			return JIT_READELF_WRONG_ARCH;
		}
	}
	if(ehdr.e_ident[EI_VERSION] != EV_CURRENT)
	{
		sys_close(fd);
		return JIT_READELF_BAD_FORMAT;
	}

	/* Read the rest of the ELF header and validate it */
	if(sys_read(fd, &(ehdr.e_type), sizeof(Elf_Ehdr) - EI_NIDENT)
			!= (sizeof(Elf_Ehdr) - EI_NIDENT))
	{
		sys_close(fd);
		return JIT_READELF_BAD_FORMAT;
	}
	if(ehdr.e_type != ET_DYN)
	{
		/* We can only load files that are marked as dynamic shared objects */
		sys_close(fd);



( run in 0.513 second using v1.01-cache-2.11-cpan-a5abf4f5562 )