Re: Macro with same operands is misbehaving

Paulo Matos <[email protected]> Mon, 8 Apr 2019 08:09:10 +0200
Newsgroups gmane.comp.tools.cgen.devel
Message-ID <[email protected]>

On 08/04/2019 03:28, Frank Ch. Eigler wrote:
> Hi -
> 
>> If I define the instruction fsgnj.s and followed by fmv.s macro, during
>> disassembly `fsgnj.s` is always chosen, although assembly works fine.
>> [...]
>> I can't find a way to say: `fmv.s` matches for disassembly but only if
>> `f1` == `f2` in `fsgnj.s f0, f1, f2`.
> 
> I don't know of a way either, at the cgen .cpu level.  But I must ask
> ... why is this particular disassembly heuristic seem important, given
> that those are equivalent?  Anyway, it may be possible to handle at
> the disassmembler driver level (in C code) even if .cpu/cgen can't
> express it.
> 

The client reckons it's important to show the macro version when
possible. :)

When you mean at the disassembler level in C, I then assume there's a
hook that cgen calls before printing a disassembly string to the output
that I can use to mangle the string back into the macro version?

-- 
Paulo Matos