diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-10-26 06:15:43 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-10-26 06:15:43 +0000 |
commit | 1628cec4d7fce310d9cde0bcc73997e5a71692c4 (patch) | |
tree | 6dff5a70de8406b153e32fdd2d60c782d6202f63 /lib/AsmParser/ParserInternals.h | |
parent | 7043d00750c558a518d08a638638ebe4d241f159 (diff) | |
download | external_llvm-1628cec4d7fce310d9cde0bcc73997e5a71692c4.zip external_llvm-1628cec4d7fce310d9cde0bcc73997e5a71692c4.tar.gz external_llvm-1628cec4d7fce310d9cde0bcc73997e5a71692c4.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/ParserInternals.h')
-rw-r--r-- | lib/AsmParser/ParserInternals.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AsmParser/ParserInternals.h b/lib/AsmParser/ParserInternals.h index 79e367f..9c94505 100644 --- a/lib/AsmParser/ParserInternals.h +++ b/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 |