mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
It seems likely that floats would need a cast too, because they are
ordinarily promoted to doubles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
484147db9c
commit
e99f4cf4ac
@ -1033,7 +1033,8 @@ void CWriter::visitBinaryOperator(Instruction &I) {
|
||||
// We must cast the results of binary operations which might be promoted.
|
||||
bool needsCast = false;
|
||||
if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy)
|
||||
|| (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)) {
|
||||
|| (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)
|
||||
|| (I.getType() == Type::FloatTy)) {
|
||||
needsCast = true;
|
||||
Out << "((";
|
||||
printType(Out, I.getType(), "", false, false);
|
||||
|
@ -1033,7 +1033,8 @@ void CWriter::visitBinaryOperator(Instruction &I) {
|
||||
// We must cast the results of binary operations which might be promoted.
|
||||
bool needsCast = false;
|
||||
if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy)
|
||||
|| (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)) {
|
||||
|| (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)
|
||||
|| (I.getType() == Type::FloatTy)) {
|
||||
needsCast = true;
|
||||
Out << "((";
|
||||
printType(Out, I.getType(), "", false, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user