diff src/clojure/clojure.cpp @ 62:4699c7bab77d

added code to retrieve CPU registers
author Robert McIntyre <rlm@mit.edu>
date Wed, 07 Mar 2012 20:10:21 -0600
parents dc8b383ecefa
children d7c38ce83421
line wrap: on
line diff
     1.1 --- a/src/clojure/clojure.cpp	Wed Mar 07 19:53:39 2012 -0600
     1.2 +++ b/src/clojure/clojure.cpp	Wed Mar 07 20:10:21 2012 -0600
     1.3 @@ -173,4 +173,16 @@
     1.4  }
     1.5  
     1.6  
     1.7 +/*
     1.8 + * Class:     com_aurellem_gb_Gb
     1.9 + * Method:    getRegisters
    1.10 + * Signature: ([I)V
    1.11 + */
    1.12 +JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_getRegisters
    1.13 +(JNIEnv *env, jclass clazz, jintArray arr){
    1.14 +  jint *registers_store = env->GetIntArrayElements(arr, 0);
    1.15 +  storeRegisters(registers_store);
    1.16 +  env->ReleaseIntArrayElements(arr, registers_store, 0);
    1.17 +}
    1.18  
    1.19 +