From 009007e690fe197d367206f784aa34a85d3e885d Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Fri, 5 Nov 2010 22:40:53 +0000 Subject: [PATCH] Hook up the '.code {16|32}' directive to the streamer. llvm-svn: 118310 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 2ebea1ac2b4..818630b981c 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -958,8 +958,11 @@ bool ARMAsmParser::ParseDirectiveCode(SMLoc L) { return Error(Parser.getTok().getLoc(), "unexpected token in directive"); Parser.Lex(); - // TODO tell the MC streamer the mode - // getParser().getStreamer().Emit???(); + if (Val == 16) + getParser().getStreamer().EmitAssemblerFlag(MCAF_Code16); + else + getParser().getStreamer().EmitAssemblerFlag(MCAF_Code32); + return false; }