mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
gdb/testsuite/ChangeLog
2011-01-25 Ken Werner <ken.werner@de.ibm.com> * gdb.opencl/convs_casts.cl: Move program scope variables into the OpenCL kernel function. Add a comment as marker. Add address space qualifiers for the remaining program scope variables. * gdb.opencl/datatypes.cl: Likewise. * gdb.opencl/operators.cl: Likewise. * gdb.opencl/vec_comps.cl: Likewise. * gdb.opencl/convs_casts.exp: Replace gdb_test_multiple by gdb_test. Add breakpoint at the marker comment. * gdb.opencl/datatypes.exp: Likewise. * gdb.opencl/operators.exp: Likewise. * gdb.opencl/vec_comps.exp: Likewise.
This commit is contained in:
@ -1,3 +1,17 @@
|
||||
2011-01-25 Ken Werner <ken.werner@de.ibm.com>
|
||||
|
||||
* gdb.opencl/convs_casts.cl: Move program scope variables into the
|
||||
OpenCL kernel function. Add a comment as marker. Add address space
|
||||
qualifiers for the remaining program scope variables.
|
||||
* gdb.opencl/datatypes.cl: Likewise.
|
||||
* gdb.opencl/operators.cl: Likewise.
|
||||
* gdb.opencl/vec_comps.cl: Likewise.
|
||||
* gdb.opencl/convs_casts.exp: Replace gdb_test_multiple by gdb_test.
|
||||
Add breakpoint at the marker comment.
|
||||
* gdb.opencl/datatypes.exp: Likewise.
|
||||
* gdb.opencl/operators.exp: Likewise.
|
||||
* gdb.opencl/vec_comps.exp: Likewise.
|
||||
|
||||
2011-01-24 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* gdb.base/printcmds.c (some_struct): New struct and instance.
|
||||
|
@ -17,22 +17,24 @@
|
||||
|
||||
Contributed by Ken Werner <ken.werner@de.ibm.com> */
|
||||
|
||||
int opencl_version = __OPENCL_VERSION__;
|
||||
__constant int opencl_version = __OPENCL_VERSION__;
|
||||
|
||||
#ifdef HAVE_cl_khr_fp64
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
int have_cl_khr_fp64 = 1;
|
||||
__constant int have_cl_khr_fp64 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp64 = 0;
|
||||
__constant int have_cl_khr_fp64 = 0;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
int have_cl_khr_fp16 = 1;
|
||||
__constant int have_cl_khr_fp16 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp16 = 0;
|
||||
__constant int have_cl_khr_fp16 = 0;
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
char c = 123;
|
||||
uchar uc = 123;
|
||||
short s = 123;
|
||||
@ -49,7 +51,7 @@ float f = 123.0;
|
||||
double d = 123.0;
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
/* marker! */
|
||||
|
||||
data[get_global_id(0)] = 1;
|
||||
}
|
||||
|
@ -40,15 +40,19 @@ if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
|
||||
clean_restart ${testfile}
|
||||
|
||||
# Set breakpoint at the OpenCL kernel
|
||||
gdb_test_multiple "break testkernel" "set pending breakpoint" {
|
||||
-re ".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" {
|
||||
gdb_test "y" "Breakpoint.*testkernel.*pending." "set pending breakpoint (without symbols)"
|
||||
}
|
||||
}
|
||||
gdb_test "break testkernel" \
|
||||
"" \
|
||||
"Set pending breakpoint" \
|
||||
".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" \
|
||||
"y"
|
||||
|
||||
gdb_run_cmd
|
||||
gdb_test "" ".*Breakpoint.*1.*testkernel.*" "run"
|
||||
|
||||
# Continue to the marker
|
||||
gdb_breakpoint [gdb_get_line_number "marker" "${clprogram}"]
|
||||
gdb_continue_to_breakpoint "marker"
|
||||
|
||||
# Retrieve some information about availability of OpenCL extensions
|
||||
set have_cl_khr_fp64 [get_integer_valueof "have_cl_khr_fp64" 0]
|
||||
set have_cl_khr_fp16 [get_integer_valueof "have_cl_khr_fp16" 0]
|
||||
|
@ -17,22 +17,24 @@
|
||||
|
||||
Contributed by Ken Werner <ken.werner@de.ibm.com> */
|
||||
|
||||
int opencl_version = __OPENCL_VERSION__;
|
||||
__constant int opencl_version = __OPENCL_VERSION__;
|
||||
|
||||
#ifdef HAVE_cl_khr_fp64
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
int have_cl_khr_fp64 = 1;
|
||||
__constant int have_cl_khr_fp64 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp64 = 0;
|
||||
__constant int have_cl_khr_fp64 = 0;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
int have_cl_khr_fp16 = 1;
|
||||
__constant int have_cl_khr_fp16 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp16 = 0;
|
||||
__constant int have_cl_khr_fp16 = 0;
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
bool b = 0;
|
||||
|
||||
char c = 1;
|
||||
@ -139,7 +141,7 @@ double8 d8 = (double8) (1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
|
||||
double16 d16 = (double16)(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0);
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
/* marker! */
|
||||
|
||||
data[get_global_id(0)] = 1;
|
||||
}
|
||||
|
@ -206,15 +206,19 @@ gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${objdir}/${subdir}/${testfile}
|
||||
|
||||
# Set breakpoint at the OpenCL kernel
|
||||
gdb_test_multiple "break testkernel" "set pending breakpoint" {
|
||||
-re ".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" {
|
||||
gdb_test "y" "Breakpoint.*testkernel.*pending." "set pending breakpoint (without symbols)"
|
||||
}
|
||||
}
|
||||
gdb_test "break testkernel" \
|
||||
"" \
|
||||
"Set pending breakpoint" \
|
||||
".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" \
|
||||
"y"
|
||||
|
||||
gdb_run_cmd
|
||||
gdb_test "" ".*Breakpoint.*1.*testkernel.*" "run"
|
||||
|
||||
# Continue to the marker
|
||||
gdb_breakpoint [gdb_get_line_number "marker" "${clprogram}"]
|
||||
gdb_continue_to_breakpoint "marker"
|
||||
|
||||
# Check if the language was switched to opencl
|
||||
gdb_test "show language" "The current source language is \"auto; currently opencl\"\."
|
||||
|
||||
|
@ -17,22 +17,24 @@
|
||||
|
||||
Contributed by Ken Werner <ken.werner@de.ibm.com> */
|
||||
|
||||
int opencl_version = __OPENCL_VERSION__;
|
||||
__constant int opencl_version = __OPENCL_VERSION__;
|
||||
|
||||
#ifdef HAVE_cl_khr_fp64
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
int have_cl_khr_fp64 = 1;
|
||||
__constant int have_cl_khr_fp64 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp64 = 0;
|
||||
__constant int have_cl_khr_fp64 = 0;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
int have_cl_khr_fp16 = 1;
|
||||
__constant int have_cl_khr_fp16 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp16 = 0;
|
||||
__constant int have_cl_khr_fp16 = 0;
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
char ca = 2;
|
||||
char cb = 1;
|
||||
uchar uca = 2;
|
||||
@ -99,7 +101,7 @@ float2 f2 = (float2) (1, 2);
|
||||
double2 d2 = (double2) (1, 2);
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
/* marker! */
|
||||
|
||||
data[get_global_id(0)] = 1;
|
||||
}
|
||||
|
@ -40,15 +40,19 @@ if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
|
||||
clean_restart ${testfile}
|
||||
|
||||
# Set breakpoint at the OpenCL kernel
|
||||
gdb_test_multiple "break testkernel" "set pending breakpoint" {
|
||||
-re ".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" {
|
||||
gdb_test "y" "Breakpoint.*testkernel.*pending." "set pending breakpoint (without symbols)"
|
||||
}
|
||||
}
|
||||
gdb_test "break testkernel" \
|
||||
"" \
|
||||
"Set pending breakpoint" \
|
||||
".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" \
|
||||
"y"
|
||||
|
||||
gdb_run_cmd
|
||||
gdb_test "" ".*Breakpoint.*1.*testkernel.*" "run"
|
||||
|
||||
# Continue to the marker
|
||||
gdb_breakpoint [gdb_get_line_number "marker" "${clprogram}"]
|
||||
gdb_continue_to_breakpoint "marker"
|
||||
|
||||
# Retrieve some information about availability of OpenCL extensions
|
||||
set have_cl_khr_fp64 [get_integer_valueof "have_cl_khr_fp64" 0]
|
||||
set have_cl_khr_fp16 [get_integer_valueof "have_cl_khr_fp16" 0]
|
||||
|
@ -17,22 +17,24 @@
|
||||
|
||||
Contributed by Ken Werner <ken.werner@de.ibm.com> */
|
||||
|
||||
int opencl_version = __OPENCL_VERSION__;
|
||||
__constant int opencl_version = __OPENCL_VERSION__;
|
||||
|
||||
#ifdef HAVE_cl_khr_fp64
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
int have_cl_khr_fp64 = 1;
|
||||
__constant int have_cl_khr_fp64 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp64 = 0;
|
||||
__constant int have_cl_khr_fp64 = 0;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
int have_cl_khr_fp16 = 1;
|
||||
__constant int have_cl_khr_fp16 = 1;
|
||||
#else
|
||||
int have_cl_khr_fp16 = 0;
|
||||
__constant int have_cl_khr_fp16 = 0;
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
#define CREATE_VEC(TYPE, NAME)\
|
||||
TYPE NAME =\
|
||||
(TYPE) (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
|
||||
@ -53,7 +55,7 @@ CREATE_VEC(float16, f16)
|
||||
CREATE_VEC(double16, d16)
|
||||
#endif
|
||||
|
||||
__kernel void testkernel (__global int *data)
|
||||
{
|
||||
/* marker! */
|
||||
|
||||
data[get_global_id(0)] = 1;
|
||||
}
|
||||
|
@ -40,15 +40,19 @@ if { [gdb_compile_opencl_hostapp "${clprogram}" "${testfile}" "" ] != "" } {
|
||||
clean_restart ${testfile}
|
||||
|
||||
# Set breakpoint at the OpenCL kernel
|
||||
gdb_test_multiple "break testkernel" "set pending breakpoint" {
|
||||
-re ".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" {
|
||||
gdb_test "y" "Breakpoint.*testkernel.*pending." "set pending breakpoint (without symbols)"
|
||||
}
|
||||
}
|
||||
gdb_test "break testkernel" \
|
||||
"" \
|
||||
"Set pending breakpoint" \
|
||||
".*Function \"testkernel\" not defined.*Make breakpoint pending.*y or \\\[n\\\]. $" \
|
||||
"y"
|
||||
|
||||
gdb_run_cmd
|
||||
gdb_test "" ".*Breakpoint.*1.*testkernel.*" "run"
|
||||
|
||||
# Continue to the marker
|
||||
gdb_breakpoint [gdb_get_line_number "marker" "${clprogram}"]
|
||||
gdb_continue_to_breakpoint "marker"
|
||||
|
||||
# Check if the language was switched to opencl
|
||||
gdb_test "show language" "The current source language is \"auto; currently opencl\"\."
|
||||
|
||||
|
Reference in New Issue
Block a user