Mercurial > hg > truffle
comparison src/gpu/ptx/vm/gpu_ptx.cpp @ 11901:61767ccd4600
PTX boolean return value, emitIntegerTestMove, warnings
author | Morris Meyer <morris.meyer@oracle.com> |
---|---|
date | Sun, 06 Oct 2013 18:15:56 -0400 |
parents | c7abc8411011 |
children | 67a1e27a8dbb |
comparison
equal
deleted
inserted
replaced
11900:1f82cda83ced | 11901:61767ccd4600 |
---|---|
381 | 381 |
382 // Get the result. TODO: Move this code to get_return_oop() | 382 // Get the result. TODO: Move this code to get_return_oop() |
383 BasicType return_type = ptxka.get_ret_type(); | 383 BasicType return_type = ptxka.get_ret_type(); |
384 switch (return_type) { | 384 switch (return_type) { |
385 case T_INT: | 385 case T_INT: |
386 { | |
387 int return_val; | |
388 status = gpu::Ptx::_cuda_cu_memcpy_dtoh(&return_val, ptxka._return_value_ptr, T_INT_BYTE_SIZE); | |
389 if (status != GRAAL_CUDA_SUCCESS) { | |
390 tty->print_cr("[CUDA] *** Error (%d) Failed to copy value to device argument", status); | |
391 return false; | |
392 } | |
393 ret.set_jint(return_val); | |
394 } | |
395 break; | |
396 case T_BOOLEAN: | |
386 { | 397 { |
387 int return_val; | 398 int return_val; |
388 status = gpu::Ptx::_cuda_cu_memcpy_dtoh(&return_val, ptxka._return_value_ptr, T_INT_BYTE_SIZE); | 399 status = gpu::Ptx::_cuda_cu_memcpy_dtoh(&return_val, ptxka._return_value_ptr, T_INT_BYTE_SIZE); |
389 if (status != GRAAL_CUDA_SUCCESS) { | 400 if (status != GRAAL_CUDA_SUCCESS) { |
390 tty->print_cr("[CUDA] *** Error (%d) Failed to copy value to device argument", status); | 401 tty->print_cr("[CUDA] *** Error (%d) Failed to copy value to device argument", status); |