aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-11-05 22:40:53 +0000
committerJim Grosbach <grosbach@apple.com>2010-11-05 22:40:53 +0000
commit2a301704ea76535f0485d5c3b75664b323249bdb (patch)
tree1ac43134732d4ca799ec95cb26f847cbc8426400
parentba21957cbd7b25e3d25a3e9befe6151000242853 (diff)
downloadexternal_llvm-2a301704ea76535f0485d5c3b75664b323249bdb.zip
external_llvm-2a301704ea76535f0485d5c3b75664b323249bdb.tar.gz
external_llvm-2a301704ea76535f0485d5c3b75664b323249bdb.tar.bz2
Hook up the '.code {16|32}' directive to the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118310 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 2ebea1a..818630b 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;
}