mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1835,8 +1835,11 @@ bool LLParser::ParseValID(ValID &ID) {
|
||||
|
||||
// Binary Operators.
|
||||
case lltok::kw_add:
|
||||
case lltok::kw_fadd:
|
||||
case lltok::kw_sub:
|
||||
case lltok::kw_fsub:
|
||||
case lltok::kw_mul:
|
||||
case lltok::kw_fmul:
|
||||
case lltok::kw_udiv:
|
||||
case lltok::kw_sdiv:
|
||||
case lltok::kw_fdiv:
|
||||
@@ -2400,8 +2403,13 @@ bool LLParser::ParseInstruction(Instruction *&Inst, BasicBlock *BB,
|
||||
// Binary Operators.
|
||||
case lltok::kw_add:
|
||||
case lltok::kw_sub:
|
||||
case lltok::kw_mul: return ParseArithmetic(Inst, PFS, KeywordVal, 0);
|
||||
|
||||
case lltok::kw_mul:
|
||||
// API compatibility: Accept either integer or floating-point types.
|
||||
return ParseArithmetic(Inst, PFS, KeywordVal, 0);
|
||||
case lltok::kw_fadd:
|
||||
case lltok::kw_fsub:
|
||||
case lltok::kw_fmul: return ParseArithmetic(Inst, PFS, KeywordVal, 2);
|
||||
|
||||
case lltok::kw_udiv:
|
||||
case lltok::kw_sdiv:
|
||||
case lltok::kw_urem:
|
||||
|
Reference in New Issue
Block a user