summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/ParserInternals.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-10-26 06:15:43 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-10-26 06:15:43 +0000
commit7e80b0b31ef448877c60de9b3d518a2a79c0a8a7 (patch)
tree12ea272f456d91b5260218887fe5d8c257bb807a /llvm/lib/AsmParser/ParserInternals.h
parent5b979ae531ed5fd89f648b528f924b547df591b8 (diff)
downloadbcm5719-llvm-7e80b0b31ef448877c60de9b3d518a2a79c0a8a7.tar.gz
bcm5719-llvm-7e80b0b31ef448877c60de9b3d518a2a79c0a8a7.zip
For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
Diffstat (limited to 'llvm/lib/AsmParser/ParserInternals.h')
-rw-r--r--llvm/lib/AsmParser/ParserInternals.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/ParserInternals.h b/llvm/lib/AsmParser/ParserInternals.h
index 79e367fe1fe..9c94505bf82 100644
--- a/llvm/lib/AsmParser/ParserInternals.h
+++ b/llvm/lib/AsmParser/ParserInternals.h
@@ -201,4 +201,20 @@ struct ValID {
} // End llvm namespace
+// This structure is used to keep track of obsolete opcodes. The lexer will
+// retain the ability to parse obsolete opcode mnemonics. In this case it will
+// set "obsolete" to true and the opcode will be the replacement opcode. For
+// example if "rem" is encountered then opcode will be set to "urem" and the
+// "obsolete" flag will be true. If the opcode is not obsolete then "obsolete"
+// will be false.
+template <class Enum>
+struct OpcodeInfo {
+ Enum opcode;
+ bool obsolete;
+};
+typedef OpcodeInfo<llvm::Instruction::BinaryOps> BinaryOpInfo;
+typedef OpcodeInfo<llvm::Instruction::TermOps> TermOpInfo;
+typedef OpcodeInfo<llvm::Instruction::MemoryOps> MemOpInfo;
+typedef OpcodeInfo<llvm::Instruction::OtherOps> OtherOpInfo;
+
#endif
OpenPOWER on IntegriCloud