Can I assign left shift in relocation HOWTO table ??

Alan Modra amodra@bigpond.net.au
Sun Oct 18 09:41:00 GMT 2009


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



More information about the Binutils mailing list