This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Suggestions for extended asm
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: Suggestions for extended asm
- From: Marek Michalkiewicz <marekm at linux dot org dot pl>
- Date: Sat, 13 May 2000 14:44:36 +0200 (CEST)
- CC: Denis Chertykov <denisc at overta dot ru>, marekm at linux dot org dot pl, gcc at gcc dot gnu dot org
> > I can search the asm patterns, try to extract number after
> > `-*-insn-length-*-' and after that correct the `length' attribute.
>
> No, this is just as error prone - what if the asm writer gets
> the length wrong?
I don't think error prone is too big problem here - extended asm gives
you enough rope to shoot yourself anyway :-). I think the worst that
could happen is that you get assembler error for out of range branch,
or less efficient code (at least on AVR these lengths are not used to
calculate real branch offsets, just to check if it is not too far).
> I mean really looking at the asm insns themselves.
> I have implemented this for the SH just last month:
To make it work completely (handle any assembler constructs that could
reasonably be used - not just the basic opcodes, but also things like
conditionals or .rept/.endr), you would have to put quite a big part of
"gas" in there. Otherwise it works most of the time, but sometimes
it might fail. What I proposed would be optional, so you can always
omit the length and hope the default guess will be correct...
Marek