From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20862 invoked by alias); 16 Feb 2011 23:33:44 -0000 Received: (qmail 20852 invoked by uid 22791); 16 Feb 2011 23:33:41 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_KG X-Spam-Check-By: sourceware.org Received: from mail-yw0-f41.google.com (HELO mail-yw0-f41.google.com) (209.85.213.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Feb 2011 23:33:35 +0000 Received: by ywj3 with SMTP id 3so940362ywj.0 for ; Wed, 16 Feb 2011 15:33:33 -0800 (PST) Received: by 10.147.124.1 with SMTP id b1mr1742668yan.22.1297899212926; Wed, 16 Feb 2011 15:33:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.147.114.12 with HTTP; Wed, 16 Feb 2011 15:33:12 -0800 (PST) In-Reply-To: References: From: Hui Zhu Date: Thu, 17 Feb 2011 02:06:00 -0000 Message-ID: Subject: Re: RFC: move agent opcodes to common file To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00401.txt.bz2 BTW I have use the op 31 to be the op_printf in my printf patch and kgtp new release version. If your software(I think is SystemTap, right?) that use aop_pick =3D 0x31, aop_rot =3D 0x32 is not release, could you let op_printf use the op 31? Thanks, Hui On Thu, Feb 17, 2011 at 07:27, Hui Zhu wrote: > Hi Tom, > > I think this patch is very good. > > And I have a question is if the common/ax.def updated, will the > ax-general.c, gdbserver/tracepoint.c and file that use the ax.h > rebuild? > > I want try this patch with myself but looks your add the new op > aop_pick =3D 0x31, aop_rot =3D 0x32. > > Thanks, > Hui > > On Thu, Feb 17, 2011 at 06:03, Tom Tromey wrote: >> I'd appreciate comments on this. >> >> When I added agent expression opcodes, I had to make boilerplate >> modifications in four places. =A0This patch centralizes the agent >> expression opcode definitions and changes all the users to use the new >> file. >> >> This came after my pick+roll patch, so it won't apply directly to HEAD. >> >> Tom >> >> 2011-02-16 =A0Tom Tromey =A0 >> >> =A0 =A0 =A0 =A0* common/ax.def: New file. >> =A0 =A0 =A0 =A0* ax.h (enum agent_op): Use ax.def. >> =A0 =A0 =A0 =A0* ax-general.c (aop_map): Use ax.def. >> >> 2011-02-16 =A0Tom Tromey =A0 >> >> =A0 =A0 =A0 =A0* tracepoint.c (enum gdb_agent_op): Use ax.def. >> =A0 =A0 =A0 =A0(gdb_agent_op_names): Likewise. >> >> diff --git a/gdb/ax-general.c b/gdb/ax-general.c >> index 06ff958..edab4dc 100644 >> --- a/gdb/ax-general.c >> +++ b/gdb/ax-general.c >> @@ -338,57 +338,11 @@ ax_tsv (struct agent_expr *x, enum agent_op op, in= t num) >> >> =A0struct aop_map aop_map[] =3D >> =A0{ >> - =A0{0, 0, 0, 0, 0}, >> - =A0{"float", 0, 0, 0, 0}, =A0 =A0 =A0 /* 0x01 */ >> - =A0{"add", 0, 0, 2, 1}, =A0 =A0 =A0 =A0 /* 0x02 */ >> - =A0{"sub", 0, 0, 2, 1}, =A0 =A0 =A0 =A0 /* 0x03 */ >> - =A0{"mul", 0, 0, 2, 1}, =A0 =A0 =A0 =A0 /* 0x04 */ >> - =A0{"div_signed", 0, 0, 2, 1}, =A0/* 0x05 */ >> - =A0{"div_unsigned", 0, 0, 2, 1}, =A0 =A0 =A0 =A0/* 0x06 */ >> - =A0{"rem_signed", 0, 0, 2, 1}, =A0/* 0x07 */ >> - =A0{"rem_unsigned", 0, 0, 2, 1}, =A0 =A0 =A0 =A0/* 0x08 */ >> - =A0{"lsh", 0, 0, 2, 1}, =A0 =A0 =A0 =A0 /* 0x09 */ >> - =A0{"rsh_signed", 0, 0, 2, 1}, =A0/* 0x0a */ >> - =A0{"rsh_unsigned", 0, 0, 2, 1}, =A0 =A0 =A0 =A0/* 0x0b */ >> - =A0{"trace", 0, 0, 2, 0}, =A0 =A0 =A0 /* 0x0c */ >> - =A0{"trace_quick", 1, 0, 1, 1}, /* 0x0d */ >> - =A0{"log_not", 0, 0, 1, 1}, =A0 =A0 /* 0x0e */ >> - =A0{"bit_and", 0, 0, 2, 1}, =A0 =A0 /* 0x0f */ >> - =A0{"bit_or", 0, 0, 2, 1}, =A0 =A0 =A0/* 0x10 */ >> - =A0{"bit_xor", 0, 0, 2, 1}, =A0 =A0 /* 0x11 */ >> - =A0{"bit_not", 0, 0, 1, 1}, =A0 =A0 /* 0x12 */ >> - =A0{"equal", 0, 0, 2, 1}, =A0 =A0 =A0 /* 0x13 */ >> - =A0{"less_signed", 0, 0, 2, 1}, /* 0x14 */ >> - =A0{"less_unsigned", 0, 0, 2, 1}, =A0 =A0 =A0 /* 0x15 */ >> - =A0{"ext", 1, 0, 1, 1}, =A0 =A0 =A0 =A0 /* 0x16 */ >> - =A0{"ref8", 0, 8, 1, 1}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x17 */ >> - =A0{"ref16", 0, 16, 1, 1}, =A0 =A0 =A0/* 0x18 */ >> - =A0{"ref32", 0, 32, 1, 1}, =A0 =A0 =A0/* 0x19 */ >> - =A0{"ref64", 0, 64, 1, 1}, =A0 =A0 =A0/* 0x1a */ >> - =A0{"ref_float", 0, 0, 1, 1}, =A0 /* 0x1b */ >> - =A0{"ref_double", 0, 0, 1, 1}, =A0/* 0x1c */ >> - =A0{"ref_long_double", 0, 0, 1, 1}, =A0 =A0 /* 0x1d */ >> - =A0{"l_to_d", 0, 0, 1, 1}, =A0 =A0 =A0/* 0x1e */ >> - =A0{"d_to_l", 0, 0, 1, 1}, =A0 =A0 =A0/* 0x1f */ >> - =A0{"if_goto", 2, 0, 1, 0}, =A0 =A0 /* 0x20 */ >> - =A0{"goto", 2, 0, 0, 0}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x21 */ >> - =A0{"const8", 1, 8, 0, 1}, =A0 =A0 =A0/* 0x22 */ >> - =A0{"const16", 2, 16, 0, 1}, =A0 =A0/* 0x23 */ >> - =A0{"const32", 4, 32, 0, 1}, =A0 =A0/* 0x24 */ >> - =A0{"const64", 8, 64, 0, 1}, =A0 =A0/* 0x25 */ >> - =A0{"reg", 2, 0, 0, 1}, =A0 =A0 =A0 =A0 /* 0x26 */ >> - =A0{"end", 0, 0, 0, 0}, =A0 =A0 =A0 =A0 /* 0x27 */ >> - =A0{"dup", 0, 0, 1, 2}, =A0 =A0 =A0 =A0 /* 0x28 */ >> - =A0{"pop", 0, 0, 1, 0}, =A0 =A0 =A0 =A0 /* 0x29 */ >> - =A0{"zero_ext", 1, 0, 1, 1}, =A0 =A0/* 0x2a */ >> - =A0{"swap", 0, 0, 2, 2}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x2b */ >> - =A0{"getv", 2, 0, 0, 1}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x2c */ >> - =A0{"setv", 2, 0, 0, 1}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x2d */ >> - =A0{"tracev", 2, 0, 0, 1}, =A0 =A0 =A0/* 0x2e */ >> - =A0{0, 0, 0, 0, 0}, =A0 =A0 =A0 =A0 =A0 =A0 /* 0x2f */ >> - =A0{"trace16", 2, 0, 1, 1}, =A0 =A0 /* 0x30 */ >> - =A0{"pick", 1, 0, 0, 1}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x31 */ >> - =A0{"roll", 0, 0, 3, 3}, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* 0x32 */ >> + =A0{0, 0, 0, 0, 0} >> +#define DEFOP(NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED, VALUE) \ >> + =A0, { # NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED } >> +#include "ax.def" >> +#undef DEFOP >> =A0}; >> >> >> diff --git a/gdb/ax.h b/gdb/ax.h >> index e34aa07..f132af8 100644 >> --- a/gdb/ax.h >> +++ b/gdb/ax.h >> @@ -145,67 +145,14 @@ struct agent_expr >> =A0 =A0 unsigned char *reg_mask; >> =A0 }; >> >> -/* The actual values of the various bytecode operations. >> - >> - =A0 Other independent implementations of the agent bytecode engine will >> - =A0 rely on the exact values of these enums, and may not be recompiled >> - =A0 when we change this table. =A0The numeric values should remain fix= ed >> - =A0 whenever possible. =A0Thus, we assign them values explicitly here = (to >> - =A0 allow gaps to form safely), and the disassembly table in >> - =A0 agentexpr.h behaves like an opcode map. =A0If you want to see them >> - =A0 grouped logically, see doc/agentexpr.texi. =A0*/ >> +/* The actual values of the various bytecode operations. =A0*/ >> >> =A0enum agent_op >> =A0 { >> - =A0 =A0aop_float =3D 0x01, >> - =A0 =A0aop_add =3D 0x02, >> - =A0 =A0aop_sub =3D 0x03, >> - =A0 =A0aop_mul =3D 0x04, >> - =A0 =A0aop_div_signed =3D 0x05, >> - =A0 =A0aop_div_unsigned =3D 0x06, >> - =A0 =A0aop_rem_signed =3D 0x07, >> - =A0 =A0aop_rem_unsigned =3D 0x08, >> - =A0 =A0aop_lsh =3D 0x09, >> - =A0 =A0aop_rsh_signed =3D 0x0a, >> - =A0 =A0aop_rsh_unsigned =3D 0x0b, >> - =A0 =A0aop_trace =3D 0x0c, >> - =A0 =A0aop_trace_quick =3D 0x0d, >> - =A0 =A0aop_log_not =3D 0x0e, >> - =A0 =A0aop_bit_and =3D 0x0f, >> - =A0 =A0aop_bit_or =3D 0x10, >> - =A0 =A0aop_bit_xor =3D 0x11, >> - =A0 =A0aop_bit_not =3D 0x12, >> - =A0 =A0aop_equal =3D 0x13, >> - =A0 =A0aop_less_signed =3D 0x14, >> - =A0 =A0aop_less_unsigned =3D 0x15, >> - =A0 =A0aop_ext =3D 0x16, >> - =A0 =A0aop_ref8 =3D 0x17, >> - =A0 =A0aop_ref16 =3D 0x18, >> - =A0 =A0aop_ref32 =3D 0x19, >> - =A0 =A0aop_ref64 =3D 0x1a, >> - =A0 =A0aop_ref_float =3D 0x1b, >> - =A0 =A0aop_ref_double =3D 0x1c, >> - =A0 =A0aop_ref_long_double =3D 0x1d, >> - =A0 =A0aop_l_to_d =3D 0x1e, >> - =A0 =A0aop_d_to_l =3D 0x1f, >> - =A0 =A0aop_if_goto =3D 0x20, >> - =A0 =A0aop_goto =3D 0x21, >> - =A0 =A0aop_const8 =3D 0x22, >> - =A0 =A0aop_const16 =3D 0x23, >> - =A0 =A0aop_const32 =3D 0x24, >> - =A0 =A0aop_const64 =3D 0x25, >> - =A0 =A0aop_reg =3D 0x26, >> - =A0 =A0aop_end =3D 0x27, >> - =A0 =A0aop_dup =3D 0x28, >> - =A0 =A0aop_pop =3D 0x29, >> - =A0 =A0aop_zero_ext =3D 0x2a, >> - =A0 =A0aop_swap =3D 0x2b, >> - =A0 =A0aop_getv =3D 0x2c, >> - =A0 =A0aop_setv =3D 0x2d, >> - =A0 =A0aop_tracev =3D 0x2e, >> - =A0 =A0aop_trace16 =3D 0x30, >> - =A0 =A0aop_pick =3D 0x31, >> - =A0 =A0aop_rot =3D 0x32, >> +#define DEFOP(NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED, VALUE) =A0\ >> + =A0 =A0aop_ ## NAME =3D VALUE, >> +#include "ax.def" >> +#undef DEFOP >> =A0 =A0 aop_last >> =A0 }; >> >> diff --git a/gdb/common/ax.def b/gdb/common/ax.def >> new file mode 100644 >> index 0000000..52b5ab2 >> --- /dev/null >> +++ b/gdb/common/ax.def >> @@ -0,0 +1,95 @@ >> +/* Definition of agent opcode values. =A0 -*- c -*- >> + =A0 Copyright (C) 1998, 1999, 2000, 2007, 2008, 2009, 2010, 2011 >> + =A0 Free Software Foundation, Inc. >> + >> + =A0 This file is part of GDB. >> + >> + =A0 This program is free software; you can redistribute it and/or modi= fy >> + =A0 it under the terms of the GNU General Public License as published = by >> + =A0 the Free Software Foundation; either version 3 of the License, or >> + =A0 (at your option) any later version. >> + >> + =A0 This program is distributed in the hope that it will be useful, >> + =A0 but WITHOUT ANY WARRANTY; without even the implied warranty of >> + =A0 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =A0See the >> + =A0 GNU General Public License for more details. >> + >> + =A0 You should have received a copy of the GNU General Public License >> + =A0 along with this program. =A0If not, see . =A0*/ >> + >> +/* The actual values of the various bytecode operations. >> + >> + =A0 Other independent implementations of the agent bytecode engine will >> + =A0 rely on the exact values of these enums, and may not be recompiled >> + =A0 when we change this table. =A0The numeric values should remain fix= ed >> + =A0 whenever possible. =A0Thus, we assign them values explicitly here = (to >> + =A0 allow gaps to form safely), and the disassembly table in >> + =A0 agentexpr.h behaves like an opcode map. =A0If you want to see them >> + =A0 grouped logically, see doc/agentexpr.texi. >> + >> + =A0 Each line is of the form: >> + >> + =A0 DEFOP (name, size, data_size, consumed, produced, opcode) >> + >> + =A0 NAME is the name of the operation. >> + =A0 SIZE is the number of argument bytes that the operation takes from >> + =A0 the bytecode stream. >> + =A0 DATA_SIZE is the size of data operated on, in bits, for operations >> + =A0 that care (ref and const). =A0It is zero otherwise. >> + =A0 CONSUMED is the number of stack elements consumed. >> + =A0 PRODUCED is the number of stack elements produced. >> + =A0 OPCODE is the operation's encoding. =A0*/ >> + >> +DEFOP (float, 0, 0, 0, 0, 0x01) >> +DEFOP (add, 0, 0, 2, 1, 0x02) >> +DEFOP (sub, 0, 0, 2, 1, 0x03) >> +DEFOP (mul, 0, 0, 2, 1, 0x04) >> +DEFOP (div_signed, 0, 0, 2, 1, 0x05) >> +DEFOP (div_unsigned, 0, 0, 2, 1, 0x06) >> +DEFOP (rem_signed, 0, 0, 2, 1, 0x07) >> +DEFOP (rem_unsigned, 0, 0, 2, 1, 0x08) >> +DEFOP (lsh, 0, 0, 2, 1, 0x09) >> +DEFOP (rsh_signed, 0, 0, 2, 1, 0x0a) >> +DEFOP (rsh_unsigned, 0, 0, 2, 1, 0x0b) >> +DEFOP (trace, 0, 0, 2, 0, 0x0c) >> +DEFOP (trace_quick, 1, 0, 1, 1, 0x0d) >> +DEFOP (log_not, 0, 0, 1, 1, 0x0e) >> +DEFOP (bit_and, 0, 0, 2, 1, 0x0f) >> +DEFOP (bit_or, 0, 0, 2, 1, 0x10) >> +DEFOP (bit_xor, 0, 0, 2, 1, 0x11) >> +DEFOP (bit_not, 0, 0, 1, 1, 0x12) >> +DEFOP (equal, 0, 0, 2, 1, 0x13) >> +DEFOP (less_signed, 0, 0, 2, 1, 0x14) >> +DEFOP (less_unsigned, 0, 0, 2, 1, 0x15) >> +DEFOP (ext, 1, 0, 1, 1, 0x16) >> +DEFOP (ref8, 0, 8, 1, 1, 0x17) >> +DEFOP (ref16, 0, 16, 1, 1, 0x18) >> +DEFOP (ref32, 0, 32, 1, 1, 0x19) >> +DEFOP (ref64, 0, 64, 1, 1, 0x1a) >> +DEFOP (ref_float, 0, 0, 1, 1, 0x1b) >> +DEFOP (ref_double, 0, 0, 1, 1, 0x1c) >> +DEFOP (ref_long_double, 0, 0, 1, 1, 0x1d) >> +DEFOP (l_to_d, 0, 0, 1, 1, 0x1e) >> +DEFOP (d_to_l, 0, 0, 1, 1, 0x1f) >> +DEFOP (if_goto, 2, 0, 1, 0, 0x20) >> +DEFOP (goto, 2, 0, 0, 0, 0x21) >> +DEFOP (const8, 1, 8, 0, 1, 0x22) >> +DEFOP (const16, 2, 16, 0, 1, 0x23) >> +DEFOP (const32, 4, 32, 0, 1, 0x24) >> +DEFOP (const64, 8, 64, 0, 1, 0x25) >> +DEFOP (reg, 2, 0, 0, 1, 0x26) >> +DEFOP (end, 0, 0, 0, 0, 0x27) >> +DEFOP (dup, 0, 0, 1, 2, 0x28) >> +DEFOP (pop, 0, 0, 1, 0, 0x29) >> +DEFOP (zero_ext, 1, 0, 1, 1, 0x2a) >> +DEFOP (swap, 0, 0, 2, 2, 0x2b) >> +DEFOP (getv, 2, 0, 0, 1, 0x2c) >> +DEFOP (setv, 2, 0, 0, 1, 0x2d) >> +DEFOP (tracev, 2, 0, 0, 1, 0x2e) >> +/* We need something here just to make the tables come out ok. =A0*/ >> +DEFOP (invalid, 0, 0, 0, 0, 0x2f) >> +DEFOP (trace16, 2, 0, 1, 1, 0x30) >> +/* The "consumed" number for pick is wrong, but there's no way to >> + =A0 express the right thing. =A0*/ >> +DEFOP (pick, 1, 0, 0, 1, 0x31) >> +DEFOP (rot, 0, 0, 3, 3, 0x32) >> diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c >> index 660cf3c..70e77a5 100644 >> --- a/gdb/gdbserver/tracepoint.c >> +++ b/gdb/gdbserver/tracepoint.c >> @@ -470,111 +470,19 @@ write_inferior_uinteger (CORE_ADDR symaddr, unsig= ned int val) >> >> =A0enum gdb_agent_op >> =A0 { >> - =A0 =A0gdb_agent_op_float =3D 0x01, >> - =A0 =A0gdb_agent_op_add =3D 0x02, >> - =A0 =A0gdb_agent_op_sub =3D 0x03, >> - =A0 =A0gdb_agent_op_mul =3D 0x04, >> - =A0 =A0gdb_agent_op_div_signed =3D 0x05, >> - =A0 =A0gdb_agent_op_div_unsigned =3D 0x06, >> - =A0 =A0gdb_agent_op_rem_signed =3D 0x07, >> - =A0 =A0gdb_agent_op_rem_unsigned =3D 0x08, >> - =A0 =A0gdb_agent_op_lsh =3D 0x09, >> - =A0 =A0gdb_agent_op_rsh_signed =3D 0x0a, >> - =A0 =A0gdb_agent_op_rsh_unsigned =3D 0x0b, >> - =A0 =A0gdb_agent_op_trace =3D 0x0c, >> - =A0 =A0gdb_agent_op_trace_quick =3D 0x0d, >> - =A0 =A0gdb_agent_op_log_not =3D 0x0e, >> - =A0 =A0gdb_agent_op_bit_and =3D 0x0f, >> - =A0 =A0gdb_agent_op_bit_or =3D 0x10, >> - =A0 =A0gdb_agent_op_bit_xor =3D 0x11, >> - =A0 =A0gdb_agent_op_bit_not =3D 0x12, >> - =A0 =A0gdb_agent_op_equal =3D 0x13, >> - =A0 =A0gdb_agent_op_less_signed =3D 0x14, >> - =A0 =A0gdb_agent_op_less_unsigned =3D 0x15, >> - =A0 =A0gdb_agent_op_ext =3D 0x16, >> - =A0 =A0gdb_agent_op_ref8 =3D 0x17, >> - =A0 =A0gdb_agent_op_ref16 =3D 0x18, >> - =A0 =A0gdb_agent_op_ref32 =3D 0x19, >> - =A0 =A0gdb_agent_op_ref64 =3D 0x1a, >> - =A0 =A0gdb_agent_op_ref_float =3D 0x1b, >> - =A0 =A0gdb_agent_op_ref_double =3D 0x1c, >> - =A0 =A0gdb_agent_op_ref_long_double =3D 0x1d, >> - =A0 =A0gdb_agent_op_l_to_d =3D 0x1e, >> - =A0 =A0gdb_agent_op_d_to_l =3D 0x1f, >> - =A0 =A0gdb_agent_op_if_goto =3D 0x20, >> - =A0 =A0gdb_agent_op_goto =3D 0x21, >> - =A0 =A0gdb_agent_op_const8 =3D 0x22, >> - =A0 =A0gdb_agent_op_const16 =3D 0x23, >> - =A0 =A0gdb_agent_op_const32 =3D 0x24, >> - =A0 =A0gdb_agent_op_const64 =3D 0x25, >> - =A0 =A0gdb_agent_op_reg =3D 0x26, >> - =A0 =A0gdb_agent_op_end =3D 0x27, >> - =A0 =A0gdb_agent_op_dup =3D 0x28, >> - =A0 =A0gdb_agent_op_pop =3D 0x29, >> - =A0 =A0gdb_agent_op_zero_ext =3D 0x2a, >> - =A0 =A0gdb_agent_op_swap =3D 0x2b, >> - =A0 =A0gdb_agent_op_getv =3D 0x2c, >> - =A0 =A0gdb_agent_op_setv =3D 0x2d, >> - =A0 =A0gdb_agent_op_tracev =3D 0x2e, >> - =A0 =A0gdb_agent_op_trace16 =3D 0x30, >> - =A0 =A0gdb_agent_op_pick =3D 0x31, >> - =A0 =A0gdb_agent_op_rot =3D 0x32, >> +#define DEFOP(NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED, VALUE) =A0\ >> + =A0 =A0gdb_agent_op_ ## NAME =3D VALUE, >> +#include "ax.def" >> +#undef DEFOP >> =A0 =A0 gdb_agent_op_last >> =A0 }; >> >> =A0static const char *gdb_agent_op_names [gdb_agent_op_last] =3D >> =A0 { >> - =A0 =A0"?undef?", >> - =A0 =A0"float", >> - =A0 =A0"add", >> - =A0 =A0"sub", >> - =A0 =A0"mul", >> - =A0 =A0"div_signed", >> - =A0 =A0"div_unsigned", >> - =A0 =A0"rem_signed", >> - =A0 =A0"rem_unsigned", >> - =A0 =A0"lsh", >> - =A0 =A0"rsh_signed", >> - =A0 =A0"rsh_unsigned", >> - =A0 =A0"trace", >> - =A0 =A0"trace_quick", >> - =A0 =A0"log_not", >> - =A0 =A0"bit_and", >> - =A0 =A0"bit_or", >> - =A0 =A0"bit_xor", >> - =A0 =A0"bit_not", >> - =A0 =A0"equal", >> - =A0 =A0"less_signed", >> - =A0 =A0"less_unsigned", >> - =A0 =A0"ext", >> - =A0 =A0"ref8", >> - =A0 =A0"ref16", >> - =A0 =A0"ref32", >> - =A0 =A0"ref64", >> - =A0 =A0"ref_float", >> - =A0 =A0"ref_double", >> - =A0 =A0"ref_long_double", >> - =A0 =A0"l_to_d", >> - =A0 =A0"d_to_l", >> - =A0 =A0"if_goto", >> - =A0 =A0"goto", >> - =A0 =A0"const8", >> - =A0 =A0"const16", >> - =A0 =A0"const32", >> - =A0 =A0"const64", >> - =A0 =A0"reg", >> - =A0 =A0"end", >> - =A0 =A0"dup", >> - =A0 =A0"pop", >> - =A0 =A0"zero_ext", >> - =A0 =A0"swap", >> - =A0 =A0"getv", >> - =A0 =A0"setv", >> - =A0 =A0"tracev", >> - =A0 =A0"?undef?", >> - =A0 =A0"trace16", >> - =A0 =A0"pick", >> - =A0 =A0"rot" >> + =A0 =A0"?undef?" >> +#define DEFOP(NAME, SIZE, DATA_SIZE, CONSUMED, PRODUCED, VALUE) =A0, # = NAME >> +#include "ax.def" >> +#undef DEFOP >> =A0 }; >> >> =A0struct agent_expr >> >