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: Denis Chertykov <denisc at overta dot ru>
- Date: 12 May 2000 23:56:56 +0400
- Cc: marekm at linux dot org dot pl, gcc at gcc dot gnu dot org
- References: <200005121650.RAA18137@phal.cygnus.co.uk>
Joern Rennecke <amylaar@cygnus.co.uk> writes:
> > 1. allow specifying the true length of assembler code
> > inserted (equivalent of set_attr "length" ... in *.md,
> > currently it is done by counting line separators in the
> > string, but that might be unreliable if machine opcodes
> > have different sizes or constructs like .rept/.endr are
> > used). This is significant to prevent assembler errors
> > if branches have limited range (like -64/+63 on AVR).
>
> This is rather error prone. I think you should rather fix the
> machine description to use ADJUST_INSN_LENGTH to fix up the length of
> assembelr insns.
Yes. I'm agree with you.
Example:
asm ("mov %0,%1 /* -*-insn-length-*- 1 */", ...
I can search the asm patterns, try to extract number after
`-*-insn-length-*-' and after that correct the `length' attribute.
Denis.