This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can I assign left shift in relocation HOWTO table ??


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]