This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Can I assign left shift in relocation HOWTO table ??
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: êëì <billyjiny at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Sun, 18 Oct 2009 20:11:34 +1030
- Subject: Re: Can I assign left shift in relocation HOWTO table ??
- References: <c62f068d0910170017i5901ab60jb4ec906e05f97952@mail.gmail.com>
On Sat, Oct 17, 2009 at 04:17:49PM +0900, êëì wrote:
> but i need to split 9 bit and shift 4 high bits left to put them into insn.
> is it possible? how can i do it?
Use the howto special_function. See elf32-spu.c:spu_elf_rel9 for one
example.
> because my ISA has no 32 bit immediate bit field.
> in other words, i want my assembler can support 'macro' insn.
> how can i do it?
Write some support code. See gas/config/tc-ppc.c ppc_macro_hash.
> i saw '.set noreorder' in gcc output with -S option when delay slot is enabled
> it means that assembler can reorder the insns, right?
> if i want to reorder some insns according to certain rules,
> because of the data dependencies,
> how can i do it?
mips is the only target I'm aware of that implements a ".set noreorder"
that actually does something. You can use tc-mips.c for example code,
but I would recommend not implementing instruction reordering in gas.
At least, not if you plan on porting higher level language compilers
for your target. A compiler can do a lot better job of instruction
optimisation than an assembler.
--
Alan Modra
Australia Development Lab, IBM