Commit 876a479a authored by Julian Kranz's avatar Julian Kranz

Jgdrr

- Continued to implement jgdrr
parent 88447a50
......@@ -20,7 +20,7 @@ public class NativeInterface {
}
public IRReilCollection decodeAndTranslate(byte[] bytes) {
return (IRReilCollection)decodeAndTranslateNative(bytes);
return (IRReilCollection) decodeAndTranslateNative(bytes);
}
/*
......@@ -54,11 +54,235 @@ public class NativeInterface {
private Object virt_t(Object t) {
return builder.virt_t((Long) t);
}
private Object sem_ip() {
return builder.sem_ip();
}
private Object sem_flags() {
return builder.sem_flags();
}
private Object sem_mxcsr() {
return builder.sem_mxcsr();
}
private Object sem_ax() {
return builder.sem_ax();
}
private Object sem_bx() {
return builder.sem_bx();
}
private Object sem_cx() {
return builder.sem_cx();
}
private Object sem_dx() {
return builder.sem_dx();
}
private Object sem_si() {
return builder.sem_si();
}
private Object sem_di() {
return builder.sem_di();
}
private Object sem_sp() {
return builder.sem_sp();
}
private Object sem_bp() {
return builder.sem_bp();
}
private Object sem_r8() {
return builder.sem_r8();
}
private Object sem_r9() {
return builder.sem_r9();
}
private Object sem_r10() {
return builder.sem_r10();
}
private Object sem_r11() {
return builder.sem_r11();
}
private Object sem_r12() {
return builder.sem_r12();
}
private Object sem_r13() {
return builder.sem_r13();
}
private Object sem_r14() {
return builder.sem_r14();
}
private Object sem_r15() {
return builder.sem_r15();
}
private Object sem_cs() {
return builder.sem_cs();
}
private Object sem_ds() {
return builder.sem_ds();
}
private Object sem_ss() {
return builder.sem_ss();
}
private Object sem_es() {
return builder.sem_es();
}
private Object sem_fs() {
return builder.sem_fs();
}
private Object sem_gs() {
return builder.sem_gs();
}
private Object sem_st0() {
return builder.sem_st0();
}
private Object sem_st1() {
return builder.sem_st1();
}
private Object sem_st2() {
return builder.sem_st2();
}
private Object sem_st3() {
return builder.sem_st3();
}
private Object sem_st4() {
return builder.sem_st4();
}
private Object sem_st5() {
return builder.sem_st5();
}
private Object sem_st6() {
return builder.sem_st6();
}
private Object sem_st7() {
return builder.sem_st7();
}
private Object sem_mm0() {
return builder.sem_mm0();
}
private Object sem_mm1() {
return builder.sem_mm1();
}
private Object sem_mm2() {
return builder.sem_mm2();
}
private Object sem_mm3() {
return builder.sem_mm3();
}
private Object sem_mm4() {
return builder.sem_mm4();
}
private Object sem_mm5() {
return builder.sem_mm5();
}
private Object sem_mm6() {
return builder.sem_mm6();
}
private Object sem_mm7() {
return builder.sem_mm7();
}
private Object sem_xmm0() {
return builder.sem_xmm0();
}
private Object sem_xmm1() {
return builder.sem_xmm1();
}
private Object sem_xmm2() {
return builder.sem_xmm2();
}
private Object sem_xmm3() {
return builder.sem_xmm3();
}
private Object sem_xmm4() {
return builder.sem_xmm4();
}
private Object sem_xmm5() {
return builder.sem_xmm5();
}
private Object sem_xmm6() {
return builder.sem_xmm6();
}
private Object sem_xmm7() {
return builder.sem_xmm7();
}
private Object sem_xmm8() {
return builder.sem_xmm8();
}
private Object sem_xmm9() {
return builder.sem_xmm9();
}
private Object sem_xmm10() {
return builder.sem_xmm10();
}
private Object sem_xmm11() {
return builder.sem_xmm11();
}
private Object sem_xmm12() {
return builder.sem_xmm12();
}
private Object sem_xmm13() {
return builder.sem_xmm13();
}
private Object sem_xmm14() {
return builder.sem_xmm14();
}
private Object sem_xmm16() {
return builder.sem_xmm15();
}
/*
* sem_address
*/
......
......@@ -117,10 +117,234 @@ static gdrr_sem_id_t *virt_t(void *closure, __word t) {
java_long_create(closure, (long int)t));
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_ip(void *closure) {
jobject ret = java_method_call(closure, "sem_ip", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_flags(void *closure) {
jobject ret = java_method_call(closure, "sem_flags", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mxcsr(void *closure) {
jobject ret = java_method_call(closure, "sem_mxcsr", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_ax(void *closure) {
jobject ret = java_method_call(closure, "sem_ax", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_bx(void *closure) {
jobject ret = java_method_call(closure, "sem_bx", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_cx(void *closure) {
jobject ret = java_method_call(closure, "sem_cx", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_dx(void *closure) {
jobject ret = java_method_call(closure, "sem_dx", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_si(void *closure) {
jobject ret = java_method_call(closure, "sem_si", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_di(void *closure) {
jobject ret = java_method_call(closure, "sem_di", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_sp(void *closure) {
jobject ret = java_method_call(closure, "sem_sp", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_bp(void *closure) {
jobject ret = java_method_call(closure, "sem_bp", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r8(void *closure) {
jobject ret = java_method_call(closure, "sem_r8", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r9(void *closure) {
jobject ret = java_method_call(closure, "sem_r9", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r10(void *closure) {
jobject ret = java_method_call(closure, "sem_r10", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r11(void *closure) {
jobject ret = java_method_call(closure, "sem_r11", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r12(void *closure) {
jobject ret = java_method_call(closure, "sem_r12", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r13(void *closure) {
jobject ret = java_method_call(closure, "sem_r13", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r14(void *closure) {
jobject ret = java_method_call(closure, "sem_r14", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_r15(void *closure) {
jobject ret = java_method_call(closure, "sem_r15", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_cs(void *closure) {
jobject ret = java_method_call(closure, "sem_cs", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_ds(void *closure) {
jobject ret = java_method_call(closure, "sem_ds", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_ss(void *closure) {
jobject ret = java_method_call(closure, "sem_ss", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_es(void *closure) {
jobject ret = java_method_call(closure, "sem_es", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_fs(void *closure) {
jobject ret = java_method_call(closure, "sem_fs", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_gs(void *closure) {
jobject ret = java_method_call(closure, "sem_gs", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st0(void *closure) {
jobject ret = java_method_call(closure, "sem_st0", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st1(void *closure) {
jobject ret = java_method_call(closure, "sem_st1", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st2(void *closure) {
jobject ret = java_method_call(closure, "sem_st2", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st3(void *closure) {
jobject ret = java_method_call(closure, "sem_st3", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st4(void *closure) {
jobject ret = java_method_call(closure, "sem_st4", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st5(void *closure) {
jobject ret = java_method_call(closure, "sem_st5", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st6(void *closure) {
jobject ret = java_method_call(closure, "sem_st6", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_st7(void *closure) {
jobject ret = java_method_call(closure, "sem_st7", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm0(void *closure) {
jobject ret = java_method_call(closure, "sem_mm0", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm1(void *closure) {
jobject ret = java_method_call(closure, "sem_mm1", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm2(void *closure) {
jobject ret = java_method_call(closure, "sem_mm2", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm3(void *closure) {
jobject ret = java_method_call(closure, "sem_mm3", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm4(void *closure) {
jobject ret = java_method_call(closure, "sem_mm4", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm5(void *closure) {
jobject ret = java_method_call(closure, "sem_mm5", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm6(void *closure) {
jobject ret = java_method_call(closure, "sem_mm6", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_mm7(void *closure) {
jobject ret = java_method_call(closure, "sem_mm7", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm0(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm0", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm1(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm1", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm2(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm2", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm3(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm3", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm4(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm4", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm5(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm5", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm6(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm6", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm7(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm7", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm8(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm8", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm9(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm9", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm10(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm10", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm11(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm11", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm12(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm12", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm13(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm13", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm14(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm14", 0);
return (gdrr_sem_id_t*)ret;
}
static gdrr_sem_id_t *sem_xmm15(void *closure) {
jobject ret = java_method_call(closure, "sem_xmm15", 0);
return (gdrr_sem_id_t*)ret;
}
// sem_address
static gdrr_sem_address_t *sem_address(void *closure, __word size,
......
......@@ -90,12 +90,292 @@ public class DefaultRReilBuilder implements IRReilBuilder {
public Id virt_t(long t) {
return new VirtualTemporaryId(t);
}
@Override
public IId sem_ip() {
return new X86RegisterId(X86Register.IP);
}
@Override
public IId sem_flags() {
return new X86RegisterId(X86Register.FLAGS);
}
@Override
public IId sem_mxcsr() {
return new X86RegisterId(X86Register.MXCSR);
}
@Override
public IId sem_ax() {
return new X86RegisterId(X86Register.AX);
}
@Override
public IId sem_bx() {
return new X86RegisterId(X86Register.BX);
}
@Override
public IId sem_cx() {
return new X86RegisterId(X86Register.CX);
}
@Override
public IId sem_dx() {
return new X86RegisterId(X86Register.DX);
}
@Override
public IId sem_si() {
return new X86RegisterId(X86Register.SI);
}
@Override
public IId sem_di() {
return new X86RegisterId(X86Register.DI);
}
@Override
public IId sem_sp() {
return new X86RegisterId(X86Register.SP);
}
@Override
public IId sem_bp() {
return new X86RegisterId(X86Register.BP);
}
@Override
public IId sem_r8() {
return new X86RegisterId(X86Register.R8);
}
@Override
public IId sem_r9() {
return new X86RegisterId(X86Register.R9);
}
@Override
public IId sem_r10() {
return new X86RegisterId(X86Register.R10);
}
@Override
public IId sem_r11() {
return new X86RegisterId(X86Register.R11);
}
@Override
public IId sem_r12() {
return new X86RegisterId(X86Register.R12);
}
@Override
public IId sem_r13() {
return new X86RegisterId(X86Register.R13);
}
@Override
public IId sem_r14() {
return new X86RegisterId(X86Register.R14);
}
@Override
public IId sem_r15() {
return new X86RegisterId(X86Register.R15);
}
@Override
public IId sem_cs() {
return new X86RegisterId(X86Register.CS);
}
@Override
public IId sem_ds() {
return new X86RegisterId(X86Register.DS);
}
@Override
public IId sem_ss() {
return new X86RegisterId(X86Register.SS);
}
@Override
public IId sem_es() {
return new X86RegisterId(X86Register.ES);
}
@Override
public IId sem_fs() {
return new X86RegisterId(X86Register.FS);
}
@Override
public IId sem_gs() {
return new X86RegisterId(X86Register.GS);
}
@Override
public IId sem_st0() {
return new X86RegisterId(X86Register.ST0);
}
@Override
public IId sem_st1() {
return new X86RegisterId(X86Register.ST1);
}
@Override
public IId sem_st2() {
return new X86RegisterId(X86Register.ST2);
}
@Override
public IId sem_st3() {
return new X86RegisterId(X86Register.ST3);
}
@Override
public IId sem_st4() {
return new X86RegisterId(X86Register.ST4);
}
@Override
public IId sem_st5() {
return new X86RegisterId(X86Register.ST5);
}
@Override
public IId sem_st6() {
return new X86RegisterId(X86Register.ST6);
}
@Override
public IId sem_st7() {
return new X86RegisterId(X86Register.ST7);
}
@Override
public IId sem_mm0() {
return new X86RegisterId(X86Register.MM0);
}
@Override
public IId sem_mm1() {
return new X86RegisterId(X86Register.MM1);
}
@Override
public IId sem_mm2() {
return new X86RegisterId(X86Register.MM2);
}
@Override
public IId sem_mm3() {
return new X86RegisterId(X86Register.MM3);
}
@Override
public IId sem_mm4() {
return new X86RegisterId(X86Register.MM4);
}
@Override
public IId sem_mm5() {
return new X86RegisterId(X86Register.MM5);
}
@Override
public IId sem_mm6() {
return new X86RegisterId(X86Register.MM6);
}
@Override
public IId sem_mm7() {
return new X86RegisterId(X86Register.MM7);
}
@Override
public IId sem_xmm0() {
return new X86RegisterId(X86Register.XMM0);
}
@Override
public IId sem_xmm1() {
return new X86RegisterId(X86Register.XMM1);
}
@Override
public IId sem_xmm2() {
return new X86RegisterId(X86Register.XMM2);
}
@Override
public IId sem_xmm3() {
return new X86RegisterId(X86Register.XMM3);
}
@Override
public IId sem_xmm4() {
return new X86RegisterId(X86Register.XMM4);
}
@Override
public IId sem_xmm5() {
return new X86RegisterId(X86Register.XMM5);
}
@Override