Esempio n. 1
0
SWIGEXPORT jlong JNICALL Java_org_jllvm_bindings_ExecutionEngineJNI_LLVMGenericValueIntWidth(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  LLVMGenericValueRef arg1 = (LLVMGenericValueRef) 0 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(LLVMGenericValueRef *)&jarg1; 
  result = (unsigned int)LLVMGenericValueIntWidth(arg1);
  jresult = (jlong)result; 
  return jresult;
}
Esempio n. 2
0
/* t -> nativeint */
CAMLprim value llvm_genericvalue_as_nativeint(value GenVal) {
  CAMLparam1(GenVal);
  assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 8 * sizeof(value)
         && "Generic value too wide to treat as a nativeint!");
  CAMLreturn(copy_nativeint(LLVMGenericValueToInt(Genericvalue_val(GenVal),1)));
}
Esempio n. 3
0
/* t -> int64 */
CAMLprim value llvm_genericvalue_as_int64(value GenVal) {
  CAMLparam1(GenVal);
  assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 64
         && "Generic value too wide to treat as an int64!");
  CAMLreturn(copy_int64(LLVMGenericValueToInt(Genericvalue_val(GenVal), 1)));
}
Esempio n. 4
0
/* t -> int */
CAMLprim value llvm_genericvalue_as_int(value GenVal) {
  assert(LLVMGenericValueIntWidth(Genericvalue_val(GenVal)) <= 8 * sizeof(value)
         && "Generic value too wide to treat as an int!");
  return Val_int(LLVMGenericValueToInt(Genericvalue_val(GenVal), 1));
}