Add '.code 32' assembler directive to MC streamers.

llvm-svn: 118309
This commit is contained in:
Jim Grosbach 2010-11-05 22:40:09 +00:00
parent 3d432a39dd
commit a98b9ba916
4 changed files with 5 additions and 1 deletions

View File

@ -45,7 +45,8 @@ enum MCSymbolAttr {
enum MCAssemblerFlag {
MCAF_SyntaxUnified, ///< .syntax (ARM/ELF)
MCAF_SubsectionsViaSymbols, ///< .subsections_via_symbols (MachO)
MCAF_Code16 ///< .code 16
MCAF_Code16, ///< .code 16
MCAF_Code32 ///< .code 32
};
} // end namespace llvm

View File

@ -255,6 +255,7 @@ void MCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
case MCAF_SyntaxUnified: OS << "\t.syntax unified"; break;
case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
case MCAF_Code16: OS << "\t.code\t16"; break;
case MCAF_Code32: OS << "\t.code\t32"; break;
}
EmitEOL();
}

View File

@ -181,6 +181,7 @@ void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
switch (Flag) {
case MCAF_SyntaxUnified: return; // no-op here.
case MCAF_Code16: return; // no-op here.
case MCAF_Code32: return; // no-op here.
case MCAF_SubsectionsViaSymbols:
getAssembler().setSubsectionsViaSymbols(true);
return;

View File

@ -152,6 +152,7 @@ void MCMachOStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
switch (Flag) {
case MCAF_SyntaxUnified: return; // no-op here.
case MCAF_Code16: return; // no-op here.
case MCAF_Code32: return; // no-op here.
case MCAF_SubsectionsViaSymbols:
getAssembler().setSubsectionsViaSymbols(true);
return;