Re: [PATCH 2/5] opcode: centralize opcode definition, part 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 25/08/18 23:44, Luc Van Oostenryck wrote:
> On Sat, Aug 25, 2018 at 10:11:57PM +0100, Ramsay Jones wrote:
>>
>>
>> On 25/08/18 16:43, Luc Van Oostenryck wrote:
>>> Opcodes are defined in linearize.c:enum opcode.
>>> The file opcode.c also contains a table with opcodes properties.
>>>
>>> Centralize these definitions into a single file: opcode.def that
>>
>> opcode.def? Hmm, I think opcode-def.h may be better.
> 
> Well, it's not a header file, it can't be used as one. I then prefer

Heh, it is no more or less a header file as any other in the project!
The fact that the macros called in it are defined in another file is
also not that uncommon!

> to not use the .h extension for it (and using the extension .def

Windows folk may get confused. ;-)

> for this sort of file (containing definition that must be expanded
> where used) is relatively common).
> 
>>> diff --git a/opcode.def b/opcode.def
>>> new file mode 100644
>>> index 000000000..7add0b879
>>> --- /dev/null
>>> +++ b/opcode.def
>>> @@ -0,0 +1,114 @@
>>> +//	OPCODE		negated		swaped		float
>>> +
>>> +OPCODE(BADOP,		BADOP,		BADOP,		BADOP)
>>
>> Heh, something is wrong with \t chars in this table. This line looked
>> fine in the original email, but when 'quoted' with '> ', it looks
>> wrong. However, some other lines ...
> 
> It's because I've used tabs to align the second column. The real file is
> fine. I suppose I should convert those into spaces.

Hmm, the original unquoted email had problems also.

ATB,
Ramsay Jones




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux