cgen -> opcodes problem
Doug Evans
dje@sebabeach.org
Mon Dec 28 21:57:00 GMT 2009
Dmitry Eremin-Solenikov wrote:
> On Mon, Dec 28, 2009 at 10:04 PM, Doug Evans <dje@sebabeach.org> wrote:
>
>> Dmitry Eremin-Solenikov wrote:
>>
>>> Hello all,
>>>
>>> I'm back to my m68hc08 binutils port done via cgen.
>>> Recently I've again stumbled upon a problem with instructions,
>>> whose base? length != ISA base length.
>>>
>>> E.g. in the attached stripped test case, the 'ttt' instruction either
>>> (should be assembled as 0x9E 0xF1) is misencoded as 0xsmth 0x00.
>>> Is this my fault? Or is this the expected behaviour and I should define
>>> f-seccode in some other way?
>>>
>>> Could you please help me?
>>>
>>>
>>>
>> Hi. cgen currently doesn't handle instructions with opcode bits beyond the
>> base insn size very well. I have a sandbox with this fixed, but it'll be
>> awhile (month or more?) before it all gets checked in.
>>
>
> Can you share some preliminary patches?
>
The changes are non-trivial. I'll see what I can do.
[e.g. maybe putting them on a branch]
>
>> In the meantime, setting base-insn-bitsize to 16 may work. [It *should*
>> work, but there may be attributes of your port I haven't taken into
>> account.]
>>
>
> Won't this break single-byte instructions?
>
>
cgen looks for insns shorter than the base-size (counter-intuitive, I
know) and handles them accordingly.
More information about the Cgen
mailing list