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 | 7e80b0b31ef448877c60de9b3d518a2a79c0a8a7 (patch) | |
tree | 12ea272f456d91b5260218887fe5d8c257bb807a /llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp | |
parent | 5b979ae531ed5fd89f648b528f924b547df591b8 (diff) | |
download | bcm5719-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/projects/Stacker/lib/compiler/StackerCompiler.cpp')
-rw-r--r-- | llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp b/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp index bae7c34c349..58358712447 100644 --- a/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp +++ b/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp @@ -1041,7 +1041,7 @@ StackerCompiler::handle_word( int tkn ) LoadInst* op1 = cast<LoadInst>(pop_integer(bb)); LoadInst* op2 = cast<LoadInst>(pop_integer(bb)); BinaryOperator* divop = - BinaryOperator::create( Instruction::Div, op1, op2); + BinaryOperator::create( Instruction::SDiv, op1, op2); bb->getInstList().push_back( divop ); push_value( bb, divop ); break; @@ -1072,7 +1072,7 @@ StackerCompiler::handle_word( int tkn ) // Divide by the third operand BinaryOperator* divop = - BinaryOperator::create( Instruction::Div, multop, op3); + BinaryOperator::create( Instruction::SDiv, multop, op3); bb->getInstList().push_back( divop ); // Push the result |