[llvm-commits] Support for ARM Run-Time ABI
Anton Korobeynikov
anton at korobeynikov.info
Fri Sep 17 08:59:07 PDT 2010
Hello, Renato
> + setOperationAction(ISD::UREM, MVT::i32, Custom);
> + setOperationAction(ISD::UREM, MVT::i64, Custom);
> }
> + else {
Please be consistent with the code style.
> - // These are expanded into libcalls.
> - if (!Subtarget->hasDivide()) {
You dropped this check. At least this will affect non-EABI targets.
> + const Type *RetTyElement = is64bit ?
> + (const Type *)Type::getInt64Ty(*DAG.getContext()) :
> + (const Type *)Type::getInt32Ty(*DAG.getContext());
These casts are not needed here.
> + RetTyParams.push_back(RetTyElement);
> + RetTyParams.push_back(RetTyElement);
> + const Type *RetTy = (const Type
> *)StructType::get(*DAG.getContext(), RetTyParams);
Ditto
> + case ISD::SREM: return LowerREM(Op.getNode(), DAG, true);
> + case ISD::UREM: return LowerREM(Op.getNode(), DAG, false);
What's about non-EABI targets? You're expanding stuff without checking for them.
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
More information about the llvm-commits
mailing list