Skip to content

bfarago/libvle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libvle

a simple and experimental library to disassemble PowerPC VLE instructions.

example

// initialize the handler
vle_t* instr = NULL;
vle_handle handle;
if (vle_init(&handle, buffer, size)) {
	printf("failed to initialize handle\n");
	return;
}

// loop on vle_next
while((instr = vle_next(&handle))) {
	vle_snprint(tmp, 256, addr, instr);
	addr  = instr->size;
	printf ("%s\n", tmp);
	vle_free(instr);
};

output

se_bmaski r7 0x10
e_lis r6 0xfffc3fe
e_li r0 0x5af0
se_slwi r3 0x1c
se_or r0 r3
e_add16i r6 r6 0xffffc000
se_stw r0 0x4(r6)
se_or r0 r3
se_mtar r16 r7
se_stw r0 0x4(r6)
se_lwz r0 0x0(r6)
se_btsti r0 0x4
se_bne 0xfffffe04
se_blr  

About

PowerPC VLE decompiler library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.7%
  • Makefile 0.3%