[PATCH][AsmParser][MC] Allow asm parser to emit elf header flags

Jack Carter Jack.Carter at imgtec.com
Fri Oct 25 14:25:48 PDT 2013


>> There may be another method (emitMipsArchDir) that would handle the -mips[1-4], -mips32r2, etc.
>
> Sorry, what is -mips32r2 a command line option?

The current Mips ISA architectures allowed through the commandline and directeves are:

  MIPSI : -mips1
  MIPSII: -mips2
  MIPSIII: -mips3
  MIPSIV: -mips4
  MIPSV: -mips5
  MIPS32R1: -mips32
  MIPS32R2: -mips32r2
  MIPS64R1: -mips64
  MIPS64R2: -mips64r2

But now that I look at it there are does not seem to any assembler directives for the ASI just commandline ones so this example does not apply. But if they did the theory could be the same.

Jack

________________________________________
From: Rafael EspĂ­ndola [rafael.espindola at gmail.com]
Sent: Friday, October 25, 2013 2:04 PM
To: Jack Carter
Cc: Rich Fuhler; Vladimir Medic; llvm-commits at cs.uiuc.edu; Jim Grosbach
Subject: Re: [PATCH][AsmParser][MC] Allow asm parser to emit elf header flags

On 25 October 2013 15:16, Jack Carter <Jack.Carter at imgtec.com> wrote:
> Rafael,
>
> I believe the following is all you are trying to get across to us:
>
> The main point is that for every line of ascii assembler code that can be written out, a streamer method must represent it so that AsmPrinter will just be making one generic call for each of them oblivious of the output type. The underlying streamer type would determine the form of the output.  AsmParser would use the same interface.

Correct.

> Non-assembler code output such as commandline information is to be output through different methods and not through the streamer since it is not going to be seen in a resultant .s file.

Correct.

> If it can be seen in a .s file it goes through the streamer. If not, it doesn't.

Correct.

> There may be a single method for any directive that changes/sets the relocation model. It would not only be used of .abicalls, but also for -call_nonpic, -call_shared, -KPIC, -non_shared, etc.

Normally there is one method per directive, but there is some
flexibility if two directives are closely related.


> There may be another method (emitMipsArchDir) that would handle the -mips[1-4], -mips32r2, etc.

Sorry, what is -mips32r2 a command line option?

> Is this a reasonable definition?
>
> Jack

Cheers,
Rafael





More information about the llvm-commits mailing list