Implement OpenCL binary operations
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:31 +0000 (07:28 -0700)
commita88c3c8dd36424c40074b0dd6f3cc124f9aded3c
tree5042c9d72bf4f27bbf0737f5b3110a92cf5a9412
parente967770468cd029b0cf0da4099eea40106aa16a3
Implement OpenCL binary operations

This implements various OpenCL binary operations, adding a new
template class to do so.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

* opencl-lang.c (opencl_relop, eval_opencl_assign): No longer
static.  Change parameters.
(eval_opencl_assign): No longer static.  Add "op" parameter.
(evaluate_subexp_opencl): Update.
* c-exp.h (opencl_binop_operation): New template class.
(opencl_assign_operation, opencl_equal_operation)
(opencl_notequal_operation, opencl_less_operation)
(opencl_gtr_operation, opencl_geq_operation)
(opencl_leq_operation): New typedefs.
gdb/ChangeLog
gdb/c-exp.h
gdb/opencl-lang.c