All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Fabrizio Fazzino <fabrizio@fazzino.it>
Cc: linux-mips@linux-mips.org
Subject: Re: Assembly macro with parameters
Date: Fri, 8 Apr 2005 12:57:17 -0400	[thread overview]
Message-ID: <20050408165717.GA8157@nevyn.them.org> (raw)
In-Reply-To: <4256B5BE.8070708@fazzino.it>

On Fri, Apr 08, 2005 at 06:47:58PM +0200, Fabrizio Fazzino wrote:
> Ralf Baechle wrote:
> >Fabrizio Fazzino wrote:
> >
> >>It works, but I need a way to set the values of the parameters
> >>at runtime; so I've tried the following macro:
> >>
> >>	#define fzmin(rd, rs, rt) asm("lwc1 $rt, rd<<11($rs)");
> >
> >Which will leave the assembler entirely unimpressed ;-)
> 
> I thought that the compiler was able to substitute also the
> values inside strings... Is there any way to force it to do so?
> 
> >Unless you only have a few instructions and are going for a quick hack
> >I really suggest to add proper support for these instructions to binutils.
> >Having working support in as, gdb, objdump will make your life so much
> >easier.
> 
> The processor I'm designing probably will not be implemented in
> any way (we just have to simulate the VHDL hardware description),
> so we just need a quick-and-dirty way to make the opcode
> conversion.

You should probably be using .word then, and generating the instruction
completely by hand.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

  reply	other threads:[~2005-04-08 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 17:53 Assembly macro with parameters Fabrizio Fazzino
2005-04-07 18:25 ` Ralf Baechle
2005-04-08 16:47   ` Fabrizio Fazzino
2005-04-08 16:57     ` Daniel Jacobowitz [this message]
2005-06-30 17:20       ` Fabrizio Fazzino
2005-06-30 17:32         ` David Daney
2005-07-01  8:38         ` Maciej W. Rozycki
2005-07-03 10:31           ` Fabrizio Fazzino
2005-07-04  7:40             ` Geert Uytterhoeven
2005-07-04 12:12             ` Maciej W. Rozycki
2005-07-09  7:22               ` Fabrizio Fazzino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050408165717.GA8157@nevyn.them.org \
    --to=dan@debian.org \
    --cc=fabrizio@fazzino.it \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.