GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
opencl-lang.c File Reference
#include "defs.h"
#include "gdbtypes.h"
#include "symtab.h"
#include "expression.h"
#include "parser-defs.h"
#include "language.h"
#include "varobj.h"
#include "c-lang.h"
#include "gdbarch.h"
#include "c-exp.h"

Go to the source code of this file.

Classes

struct  lval_closure
 
class  opencl_language
 

Namespaces

namespace  expr
 

Macros

#define HEXCHAR_TO_INT(C)
 
#define OCL_STRING(S)   #S
 
#define BUILD_OCL_VTYPES(TYPE, ELEMENT_TYPE)
 

Functions

static struct typelookup_opencl_vector_type (struct gdbarch *gdbarch, enum type_code code, unsigned int el_length, unsigned int flag_unsigned, int n)
 
static int array_has_dups (int *arr, int n)
 
static struct lval_closureallocate_lval_closure (int *indices, int n, struct value *val)
 
static void lval_func_read (struct value *v)
 
static void lval_func_write (struct value *v, struct value *fromval)
 
static bool lval_func_check_synthetic_pointer (const struct value *v, LONGEST offset, int length)
 
static void * lval_func_copy_closure (const struct value *v)
 
static void lval_func_free_closure (struct value *v)
 
static struct valuecreate_value (struct gdbarch *gdbarch, struct value *val, enum noside noside, int *indices, int n)
 
static struct valueopencl_component_ref (struct expression *exp, struct value *val, const char *comps, enum noside noside)
 
struct valueopencl_logical_not (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg)
 
static int scalar_relop (struct value *val1, struct value *val2, enum exp_opcode op)
 
static struct valuevector_relop (struct expression *exp, struct value *val1, struct value *val2, enum exp_opcode op)
 
struct valueopencl_value_cast (struct type *type, struct value *arg)
 
struct valueopencl_relop (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
 
struct valueeval_opencl_assign (struct type *expect_type, struct expression *exp, enum noside noside, enum exp_opcode op, struct value *arg1, struct value *arg2)
 

Variables

static const struct lval_funcs opencl_value_funcs
 
static opencl_language opencl_language_defn
 

Macro Definition Documentation

◆ BUILD_OCL_VTYPES

#define BUILD_OCL_VTYPES ( TYPE,
ELEMENT_TYPE )
Value:
do \
{ \
struct type *tmp; \
tmp = add (init_vector_type (ELEMENT_TYPE, 2)); \
tmp->set_name (OCL_STRING(TYPE ## 2)); \
tmp = add (init_vector_type (ELEMENT_TYPE, 3)); \
tmp->set_name (OCL_STRING(TYPE ## 3)); \
tmp->set_length (4 * (ELEMENT_TYPE)->length ()); \
tmp = add (init_vector_type (ELEMENT_TYPE, 4)); \
tmp->set_name (OCL_STRING(TYPE ## 4)); \
tmp = add (init_vector_type (ELEMENT_TYPE, 8)); \
tmp->set_name (OCL_STRING(TYPE ## 8)); \
tmp = init_vector_type (ELEMENT_TYPE, 16); \
tmp->set_name (OCL_STRING(TYPE ## 16)); \
} \
while (false)
struct type * init_vector_type(struct type *elt_type, int n)
Definition gdbtypes.c:1491
#define OCL_STRING(S)
ULONGEST length() const
Definition gdbtypes.h:983
void set_name(const char *name)
Definition gdbtypes.h:974
void set_length(ULONGEST length)
Definition gdbtypes.h:988

◆ HEXCHAR_TO_INT

#define HEXCHAR_TO_INT ( C)
Value:
((C >= '0' && C <= '9') ? \
C-'0' : ((C >= 'A' && C <= 'F') ? \
C-'A'+10 : ((C >= 'a' && C <= 'f') ? \
C-'a'+10 : -1)))

◆ OCL_STRING

#define OCL_STRING ( S)    #S

Function Documentation

◆ allocate_lval_closure()

static struct lval_closure * allocate_lval_closure ( int * indices,
int n,
struct value * val )
static

◆ array_has_dups()

static int array_has_dups ( int * arr,
int n )
static

Definition at line 70 of file opencl-lang.c.

Referenced by create_value().

◆ create_value()

static struct value * create_value ( struct gdbarch * gdbarch,
struct value * val,
enum noside noside,
int * indices,
int n )
static

◆ eval_opencl_assign()

struct value * eval_opencl_assign ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode op,
struct value * arg1,
struct value * arg2 )

◆ lookup_opencl_vector_type()

static struct type * lookup_opencl_vector_type ( struct gdbarch * gdbarch,
enum type_code code,
unsigned int el_length,
unsigned int flag_unsigned,
int n )
static

◆ lval_func_check_synthetic_pointer()

static bool lval_func_check_synthetic_pointer ( const struct value * v,
LONGEST offset,
int length )
static

◆ lval_func_copy_closure()

static void * lval_func_copy_closure ( const struct value * v)
static

Definition at line 227 of file opencl-lang.c.

References value::computed_closure(), and lval_closure::refc.

◆ lval_func_free_closure()

static void lval_func_free_closure ( struct value * v)
static

◆ lval_func_read()

static void lval_func_read ( struct value * v)
static

◆ lval_func_write()

static void lval_func_write ( struct value * v,
struct value * fromval )
static

◆ opencl_component_ref()

static struct value * opencl_component_ref ( struct expression * exp,
struct value * val,
const char * comps,
enum noside noside )
static

◆ opencl_logical_not()

struct value * opencl_logical_not ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode op,
struct value * arg )

◆ opencl_relop()

struct value * opencl_relop ( struct type * expect_type,
struct expression * exp,
enum noside noside noside ,
enum exp_opcode op,
struct value * arg1,
struct value * arg2 )

◆ opencl_value_cast()

struct value * opencl_value_cast ( struct type * type,
struct value * arg )

◆ scalar_relop()

static int scalar_relop ( struct value * val1,
struct value * val2,
enum exp_opcode op )
static

Definition at line 491 of file opencl-lang.c.

References value_equal(), value_less(), and value_logical_not().

Referenced by opencl_relop(), and vector_relop().

◆ vector_relop()

static struct value * vector_relop ( struct expression * exp,
struct value * val1,
struct value * val2,
enum exp_opcode op )
static

Variable Documentation

◆ opencl_language_defn

opencl_language opencl_language_defn
static

Definition at line 989 of file opencl-lang.c.

◆ opencl_value_funcs

const struct lval_funcs opencl_value_funcs
static
Initial value:
=
{
nullptr,
NULL,
NULL,
}
static void lval_func_write(struct value *v, struct value *fromval)
static void lval_func_free_closure(struct value *v)
static void lval_func_read(struct value *v)
static void * lval_func_copy_closure(const struct value *v)
static bool lval_func_check_synthetic_pointer(const struct value *v, LONGEST offset, int length)

Definition at line 251 of file opencl-lang.c.

Referenced by create_value().